Feature request: toRelative multiple units
See original GitHub issueIt would be great to specify multiple units for toRelative()
to receive a more precise result if the date is less than 24 hours.
toRelative({ units: ['days', 'hours' ]})
> 24 hours
in 2 days
< 24 hours
in 10 hours
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Feature request: toRelative multiple units #672 - GitHub
Its format method which is used by toRelative only accepts a value and a single unit, to create texts such as one day...
Read more >Feature request: dual sharing - Microsoft Community Hub
Having two people share would be useful. In real life you can have two things in the room to switch between. You need...
Read more >Server-side rendering (SSR) with Angular Universal
These services send requests to relative URLs such as api/heroes . In a server-side rendered app, HTTP URLs must be absolute (for example,...
Read more >Feature request response email templates - LiveAgent
Feature requests are messages that customers send to inquire about a feature that is not included in your product or service. Receiving feature...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The difference between these two methods is that
toRelative
deals with datetime whereastoRelativeCalendar
handles dates only. Hence the day granularity for the latter.I opened a PR at #926 to implement this.