I don’t often hear it said in simple terms–why one can, and should, look to alternatives for Moment.js. And, the truth is, you probably don’t need Moment.js. It’s bundle size is not the smallest, but compared to the 513KB of moment + moment-timezone, it’s still a huge improvement.Ĭheck out Part 2 (coming soon) for how we migrated the actual library.It’s 2020. It has all of the utilities, timezone support and locale support that we need. A little more than a day of effort allowed us to have full confidence in our choice of luxon as our library moving forward. It was not a very long journey to arrive here honestly. The most critical of which does not calculate offset properly when entering or leaving DST. It turns out the day.js does not support daylight savings time very well, and there are numerous open issues around it on the repo. We were able to learn how both libraries worked for our use cases as well as finding a critical failure in day.js. This yielded a set of function names that we then needed to fulfill with day.js and luxon. We first started by writing the test suite against moment to have a “static” source of truth for values we trusted.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |