Open detrout opened 4 years ago
actually in the examples it's 1969-07-21
with 0
:
https://github.com/bigeasy/timezone/blob/master/src/synopsis.js#L75
if you change it this way, the code works
TBH I would have expected it to work without zero as well, so this issue could be worth considering for useability.
it's also a mystery why when fed 1969-7-21 02:56
without zero, it returns a function that when evaluated returns 1.0.22
(the module version number); it this input is to be really considered invalid (which I tend to disagree) I would expect an exception or some error.
Ah I did typo the example.
I too would've expected an exception for unparsable input as well. Returning a function that returns the version is pretty odd behavior.
I was turning the examples into a test and ran into an error.
I tried it both with a copy I was building for a Debian package, and a copy installed into a new directory with npm install timezone.