Date-fns: Add time to `formatRelative` with all cases

Created on 14 Sep 2018  路  3Comments  路  Source: date-fns/date-fns

Currently formatRelative adds a time for nearby times but only displays the date for further dates as can be seen here. That behaviour isn't really consistent - shouldn't it display something like 12/31/2017 at 04:30 AM for those cases?

馃帀 Feature

Most helpful comment

That's cool. I can't promise when it will be released, but it's something worth implementing.

All 3 comments

That is a good point, we can allow passing a custom formatting string for the "Other".

Sorry for closing this early - I figured I could pass my own custom formatting in the locale option, but it would be nice to have an easier way to do so.

That's cool. I can't promise when it will be released, but it's something worth implementing.

Was this page helpful?
0 / 5 - 0 ratings