For now I think this can be its own module that has conversion functions to/from many of our types (most directly, Js.Date.t -> InstantUTC.t, and other functions that extract and convert values from that point).
I'd like to avoid sprinkling references to Js.Date inside our core modules, so that someday running this thing on native will be easier to approach.
This could use a lot more testing, but the actual part that talks to JS Date is (minimally) tested in both directions, and the rest is mostly just composing other functions that should be working correctly.
For now I think this can be its own module that has conversion functions to/from many of our types (most directly,
Js.Date.t -> InstantUTC.t
, and other functions that extract and convert values from that point).I'd like to avoid sprinkling references to
Js.Date
inside our core modules, so that someday running this thing on native will be easier to approach.