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
Is your feature request related to a problem? Please describe.
Currently, the formatter for
Formatting date and time rangesdoes 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.RelativeTimeFormatand not justRelativeTimeFormatUnitDescribe the solution you'd like
Instead of:
The
RelativeTimeFormatOptionstype should also accept the options from theIntl.RelativeTimeFormatconstructor:Describe alternatives you've considered
The only alternative would be to use the native
IntlAPI directly, but this should be integrated into the formatter innext-intlIMO