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

Year from an instant gets mis-parsed: 2018 becomes 118 #126

Open
WorldsEndless opened this issue Mar 1, 2018 · 1 comment
Open

Year from an instant gets mis-parsed: 2018 becomes 118 #126

WorldsEndless opened this issue Mar 1, 2018 · 1 comment

Comments

@WorldsEndless
Copy link

(timec/year (timec/from-utc-time-zone (js/Date.))) ; =>118

@tomjkidd
Copy link

tomjkidd commented Mar 8, 2018

I think this is because your js/Date is a javascript date, not a goog.date one, and the getYear function for js/Date has this issue.

(-> (js/Date.) (.getYear)) ; => 118 
(-> (timec/now) timec/from-utc-time-zone timec/year) ; => 2018

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

No branches or pull requests

2 participants