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 numerical constructor for Date so it is local; closes #2 #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evanp
Copy link
Contributor

@evanp evanp commented Mar 21, 2018

Instead of new Date(string) we do new Date(year, month, day), which will give a local value for the ymd. This matters if you're west of GMT, where local midnight is not the same date as GMT midnight.

I also changed the test script so that it runs for two different timezones on either side of GMT, to make sure it works in all cases.

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.

2 participants