byteclubfr / todotxt

Todo.txt parser/serializer for node
ISC License
6 stars 4 forks source link

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

Open evanp opened 6 years ago

evanp commented 6 years ago

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.