Skip to content

Comments

Use numerical constructor for Date so it is local; closes #2#7

Open
evanp wants to merge 1 commit intobyteclubfr:masterfrom
evanp:issue-2
Open

Use numerical constructor for Date so it is local; closes #2#7
evanp wants to merge 1 commit intobyteclubfr:masterfrom
evanp:issue-2

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