Closed wokalski closed 2 years ago
> parseInt("01231", 10)
1231
Oh my gosh, great find. Apologies for the sloppy parsing. Wanna make a pr? Thank you.
I don't have time and insight to make a PR at this point. The parsing code is a bit convoluted and I already forgot where it was from the time I reported this issue.
haha, no prob. I'll do a fix this week cheers
While youre on it I found another issue. Sorry for the syntactic differences (I'm using rescript), but you'll get the gist:
t->equal(iso8601TimestampWithTimezone("1994-11-05T08:15:30.23-05:00"), ParsedJson(Spacetime.fromString("1994-11-05T08:15:30.23-05:00")->Spacetime.Tz.gotoCurrent), "valid date in us")
gives me (in tests):
- "epoch": 784041330230,
+ "epoch": 784041330023,
The correct value comes from Date.parse.
hey @wokalski these appear fixed now on dev branch - will do a release in the new year
spacetime('2021-11-02T19:55:30.087772+01').format("iso")
// 2021-11-02T19:55:30.087+01:00
spacetime('1994-11-05T08:15:30.23-05:00').format("iso")
// 1994-11-05T08:15:30.230-05:00
will leave this open until then cheers
Great
released as 7.0.0