Use js Intl api instead of date-fns format #1173

Open
opened 1 month ago by dpschen · 3 comments
dpschen commented 1 month ago
Collaborator

The ECMAScript Internationalization API can replace a lot of parts maybe even everything of date-fns and has good support.

The [ECMAScript Internationalization API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) can replace a lot of parts maybe even everything of date-fns and has good support.
konrad added the
kind/feature
label 1 month ago
Owner

Can it do things like "two hours ago"?

Can it do things like "two hours ago"?
Poster
Collaborator

Yes with RelativeTimeFormat. It's a really good api! They basically try to undo the fuckup they did with the normal js date =)

Yes with [RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). It's a really good api! They basically try to undo the fuckup they did with the normal js date =)
Owner

Ohhh right, I remember having read something about this. Finally no more months starting at 0!

Looks great!

Ohhh right, I remember having read something about this. Finally no more months starting at 0! Looks great!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.