FormatWidthType
Specifies the width of a date or time format.
For example, a "short
" date might contain numerals for month, day and year, with a 2-digit year, and omitting the day of the week.
A "full
" date might contain all relevant date fields in their widest representation, e.g. full-length weekday and month name, 4-digit year, etc.
Syntax
'short' | 'medium' | 'long' | 'full'
Example
const cldr = framework.get('en');
const date = 1530087780000;
const zoneId = 'America/New_York';
log(cldr.Calendars.formatDate({ date, zoneId }, { date: 'short' }));
6/27/18
const cldr = framework.get('en');
const date = 1530087780000;
const zoneId = 'America/New_York';
log(cldr.Calendars.formatDate({ date, zoneId }, { date: 'full' }));
Wednesday, June 27, 2018