Discussion

Ask HN: Are there *any* good JavaScript libraries

Every JS library I've seen (currently using moment) seems extremely simplistic with very few primitives for working with time.

As a former Java programmer, I'm used to having all of the following (in the standard lib no less!):

* instant: a point of time

* duration: time amount, e.g. 500 seconds

* period: time interval amount (e.g. 3 days)

* offset: time difference from UTC

* timezone: regional offset system

* local/offset/timezone date: date

* local/offset/timezone time: time

* local/offset/timezone datetime: date and time

For example, I work with a lot of legal calendar events (local date) and contract durations (period), yet everything I find requires awkwardly couching it in terms of instants.

2 points paulddraper 7 years ago 2 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton