Merge pull request #213 from gurjeet/use_getFullYearInExample
Use JS Date's getFullYear() in first example.
This commit is contained in:
commit
aa242b028b
@ -23,7 +23,7 @@ var conString = "tcp://postgres:1234@localhost/postgres";
|
||||
pg.connect(conString, function(err, client) {
|
||||
client.query("SELECT NOW() as when", function(err, result) {
|
||||
console.log("Row count: %d",result.rows.length); // 1
|
||||
console.log("Current year: %d", result.rows[0].when.getYear());
|
||||
console.log("Current year: %d", result.rows[0].when.getFullYear());
|
||||
});
|
||||
});
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user