Fork me on GitHub
#malli
<
2020-11-02
>
lmergen11:11:10

is this a valid instant? it can be represented by Instant, but it appears to not be parsable by malli.transform:

(pr-str (mt/-string->date "0000-12-31T23:59:59.999Z"))
=> "0000-12-31T23:59:59.999Z"

lmergen11:11:08

1. Caused by java.time.DateTimeException
   Invalid value for YearOfEra (valid values 1 -
   999999999/1000000000): 0
apparently that's the issue

lmergen11:11:12

seems like a inconsistency to me to what Instant can represent and DateTime can parse

ikitommi20:11:24

@lmergen inst? should be companioned with set of date-types, the issue is here: https://github.com/metosin/malli/issues/49. That said, we just merged an enhancement to inst? transformation, happy to take another one, if there is something still missing. See https://github.com/metosin/malli/pull/280

lmergen20:11:17

I’ll take a look, thanks! This is a corner case anyway

👍 3
lmergen20:11:22

looks like this may indeed fix my issue as it’s the same instant -> date -> instant round trip, I’ll give it a try