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

.calendar() does not respect timezone information #946

Closed
timrwood opened this issue Jul 23, 2013 · 0 comments · Fixed by #1019
Closed

.calendar() does not respect timezone information #946

timrwood opened this issue Jul 23, 2013 · 0 comments · Fixed by #1019
Labels

Comments

@timrwood
Copy link
Member

Copied from moment/moment-timezone#17

If you look here

moment/moment.js

Line 1266 in ae34b81

var diff = this.diff(moment().startOf('day'), 'days', true),

We are creating a fresh moment with the no timezone information so the calendar() method doesn't calculate the day diff correctly.

I've manually fixed this by inlining the body of the method into my code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant