3 ms·
I ended up writing a simple date library that used objects with year, month and day keys to represent dates. It made it much easier to define operations like “t
by underwater 9y ago
I ended up writing a simple date library that used objects with year, month and day keys to represent dates. It made it much easier to define operations like “the same day next month” in a way that didn’t break down on edge cases, and using plain objects worked much more nicely with Redux, et al. https://github.com/joshduck/simple-day/blob/master/src/SimpleDay.js https://github.com/joshduck/simple-day/blob/master/src/Simpl...