Re:Falsehoods programmers believe about time and time zones
by ShellfishMeme on Monday April 18, 2016 @02:18AM
(#11517999)
MomentJS is great and offers pretty much everything you need time manipulation wise. That being said, I've spent many hours debugging problems with moment because many operations mutate the 'moment' instance that you're working with.
If you generate some moments and need to reuse them for multiple calculations, you need to constantly clone them.
I wish there was a moment-like library with good performance that's immutable.
Re:Falsehoods programmers believe about time and time zones
by camhenlin on Sunday April 17, 2016 @09:19PM
(#11517166)
Saw the title and came here to write about moment. I work on a large code base that had considerable amounts of code related to time conversions in numerous different places, each handled differently with different bugs, and I've slowly been moving things towards just using moment. It's been a huge time saver and has fixed issues everywhere I've ended up using. Probably one of the most useful libraries around for sure!
Timezones conversion is super hard, which is the exact reason I rely on libraries rather than trying to reinvent the wheel.