Uses luxon DateTime.fromJSDate and DateTime.fromISO to convert from JS date to ISO and from ISO to JS date.
When storing dates the time is not stored, so it's local date that's being stored. Blindly stripping the time information from Date().toISOString() will cause date to jump around.
new Date(isoDate) sets hours to UTC 00:00:00
DateTime.fromISO(isoDate) sets hours to Local 00:00:00
Mismatch in using different transformations from string to date and vice versa also causes dates to jump around.
Uses luxon
DateTime.fromJSDate
andDateTime.fromISO
to convert from JS date to ISO and from ISO to JS date.When storing dates the time is not stored, so it's local date that's being stored. Blindly stripping the time information from
Date().toISOString()
will cause date to jump around.new Date(isoDate)
sets hours to UTC 00:00:00DateTime.fromISO(isoDate)
sets hours to Local 00:00:00Mismatch in using different transformations from string to date and vice versa also causes dates to jump around.
Should close #700