dateFieldName
Returns a localized date-field name based on a specific format specifier.
The available type
values are:
era
year
quarter
month
week
day
dayperiod
hour
minute
second
zone
The available nameType
values are:
wide
narrow
short
dateFieldName({ type: 'day' }); //returns 'day';
dateFieldName({ type: 'day', nameType: 'wide' }); //returns 'day';
dateFieldName({ type: 'month', nameType: 'short' }); //returns 'mo.';
dateFieldName({ type: 'month', nameType: 'wide' }); //returns 'month';
Parameters
options
Detailed configuration for the desired date-field name.
locale?
string
The optional locale id
. If not specified, the id
of the "en"
locale is used.
Returns
string
- The localized date-field name from the current locale based on the option.