3 ms·
A big "Thank you!" to the developers of Moment.js. For the last 8 years or so it has always been the first library I included in any new JS-project. I didn't e
by qwertox 6y ago
A big "Thank you!" to the developers of Moment.js. For the last 8 years or so it has always been the first library I included in any new JS-project.
I didn't even bother looking for alternatives, so I didn't know about Intl, Luxon & day.js until today.
The size of the library has always been one of these things where I thought that the benefits outweigh the costs, and I knew that it wouldn't be like this forever. To me, this time in the future has come now, and I will switch to day.js (or Luxon, day.js has its size on its side, but I still need to compare).
No other library has filled a huge gap in JavaScript like Moment.js did for so many years.
On a note aside: I wish HTML had a <time>-tag, so we could also settle the timezone problem in publications like rocket launches or starting times of keynotes once and for all, where the publisher would use something like <time tz="Europe/Berlin">2020-09-15 10:26:48</time> and the browser would show it to the reader in the reader's local timezone.
- yesbabyyes 6y ago> On a note aside: I wish HTML had a <time>-tag, so we could also settle the timezone problem in publications like rocket launches or starting times of keynotes once and for all, where the publisher would use something like <time tz="Europe/Berlin">2020-09-15 10:26:48</time> and the browser would show it to the reader in the reader's local timezone. While the browser won't convert it automatically, this is what the HTML <time>⁰ tag is for. The publisher can use <time datetime="2020-09-15T10:26:48+2">2020-09-15 10:26:48</time> and include a script which will read the datetime attribute and convert it to the browser's local time zone. ⁰ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ti...
- metafunctor 6y agoHTML5 does have a <time>-tag, but browsers don't render times in local time, you need JavaScript for that.
- kevmo 6y agoNo other library has filled a huge gap in JavaScript like Moment.js did for so many years. I might say jQuery... which is mighty fine company to be included with!