purescript-codec-argonaut
purescript-codec-argonaut copied to clipboard
Prefered way to encode DateTime
How would you advise to work with DataTime
from the core package and codecs, is the preferred way would be to convert it to Milliseconds
using unInstant $ Instant.fromDate date
and convert it back using Instant.toDateTime
?
I'd say "it depends" - which is why this library doesn't provide codecs for the datetime library. If you're dealing with an external API that representation might not be suitable. If you don't care about the specifics of the representation then yeah, dimap
ping via Instant
is probably the easiest definition.