Comment

Comment by koromak

I'm currently procrastinating my task of migrating an entire frontend from MomentJS to date-fns. I hate dates, and I hate this work. I would be overjoyed if we get a standard.

Funnily enough, date-fns-tz is MUCH worse than moment-timezone, so much so that I'm regretting making the decision to migrate. It works by fundamentally altering the Unix timestamp of the underlying date, so that when you format() it, the times appear correct. But try to actually pull a unix seconds out of it and you're screwed.

I should have stuck with the larger bundle size. Aside from Moment being mutable and non-tree-shakeable, the api is better in every way if you care about fixed, non-local timezones.

parent koromak 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton