Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JS Date's getFullYear() in first example. #213

Merged
merged 1 commit into from
Nov 3, 2012

Conversation

gurjeet
Copy link
Contributor

@gurjeet gurjeet commented Nov 3, 2012

In year 2012, seeing the output of 112 confused me, and would potentially
confuse any JS noob. I thought it was some bug in node-postgres.

Presumably, JS starts counting time from Jan 1, 1900!

Also, according to [1], getYear() is deprecated and one should use getFullYear()
instead.

[1] http://www.w3schools.com/jsref/jsref_obj_date.asp

In year 2012, seeing the output of 112 confused me, and would potentially
confuse any JS noob. I thought it was some bug in node-postgres.

Presumably, JS starts counting time from Jan 1, 1900!

Also, according to [1], getYear() is deprecated and one should use getFullYear()
instead.

[1] http://www.w3schools.com/jsref/jsref_obj_date.asp
@brianc
Copy link
Owner

brianc commented Nov 3, 2012

muchas gracias!

brianc added a commit that referenced this pull request Nov 3, 2012
Use JS Date's getFullYear() in first example.
@brianc brianc merged commit aa242b0 into brianc:master Nov 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants