27 introduced an off by one error in date displays. This happened because javascript's Date constructor parses date strings in UTC, but renders them out in the local timezone. Only strings are parsed into UTC, while other param configurations are done in local time. Facepalm.
Options for a fix included passing the date arroung as an array of params to the Date constructor, but that feels a bit wonky. Another option is using moment, but that bring back 70k into the bundle to render a date. Other options were luxon (the newer, smaller successor to moment, made by its creators), but that also seemed like overkill. date-fns seems to be a nice, usable compromise. we're importing just the parseISO and format methods, and it gets done pretty simply.
27 introduced an off by one error in date displays. This happened because javascript's Date constructor parses date strings in UTC, but renders them out in the local timezone. Only strings are parsed into UTC, while other param configurations are done in local time. Facepalm.
Options for a fix included passing the date arroung as an array of params to the Date constructor, but that feels a bit wonky. Another option is using moment, but that bring back 70k into the bundle to render a date. Other options were luxon (the newer, smaller successor to moment, made by its creators), but that also seemed like overkill. date-fns seems to be a nice, usable compromise. we're importing just the parseISO and format methods, and it gets done pretty simply.