You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Javascript's Date sucks. TC39 even thinks so and they're making a replacement.
All of date-fns work on Javascript's Date object but maybe they don't have to. I'm building a calendar app and storing my dates as ISO strings (because Javascript's Date sucks). Every operation that I do I have to parseISO, do the thing, then formatISO. What if we cut out the Date middle man and just worked on iso strings instead? Is Date doing a bunch of heavy lifting for date-fns?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Javascript's
Date
sucks. TC39 even thinks so and they're making a replacement.All of
date-fns
work on Javascript'sDate
object but maybe they don't have to. I'm building a calendar app and storing my dates as ISO strings (because Javascript'sDate
sucks). Every operation that I do I have toparseISO
, do the thing, thenformatISO
. What if we cut out theDate
middle man and just worked on iso strings instead? IsDate
doing a bunch of heavy lifting fordate-fns
?Beta Was this translation helpful? Give feedback.
All reactions