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

Open
opened 2021-12-11 12:57:23 +00:00 by dpschen · 3 comments
Member

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 2021-12-11 13:02:10 +00:00
Owner

Can it do things like "two hours ago"?

Can it do things like "two hours ago"?
Author
Member

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
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1884
No description provided.