The following tests will fail with the current handling of converting millis to DateTime:
# test last day of 1st year after epoch
expect
str = epochMillisToDateTime (364 * 24 * 60 * 60 * 1000) |> toIso8601Str
str == "1970-12-31T00:00.00Z"
# test last day of 1st month after epoch
expect
str = epochMillisToDateTime (30 * 24 * 60 * 60 * 1000) |> toIso8601Str
str == "1970-01-31T00:00.00Z"
Bug is due to use of >= in current.day > countDaysInMonth and current.day > countDaysInYear. Should be >.
The following tests will fail with the current handling of converting millis to DateTime:
Bug is due to use of
>=
incurrent.day > countDaysInMonth
andcurrent.day > countDaysInYear
. Should be>
.