-
-
Notifications
You must be signed in to change notification settings - Fork 308
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
Currently, the formatter for Formatting date and time ranges
does not support additional configuration other than specifying the exact unit to display the output in.
The relative time formatting should support all the options from Intl.RelativeTimeFormat
and not just RelativeTimeFormatUnit
Describe the solution you'd like
Instead of:
type RelativeTimeFormatOptions = {
now?: number | Date;
unit?: Intl.RelativeTimeFormatUnit;
};
export default RelativeTimeFormatOptions;
The RelativeTimeFormatOptions
type should also accept the options from the Intl.RelativeTimeFormat
constructor:
- numberingSystem
- style
- numeric
Describe alternatives you've considered
The only alternative would be to use the native Intl
API directly, but this should be integrated into the formatter in next-intl
IMO