import hasOwnProp from '../utils/has-own-prop';
-var aliases =
-{
+var aliases = {
D: 'date',
dates: 'date',
date: 'date',
isoweek: 'isoWeek',
y: 'year',
years: 'year',
- year: 'year'
- }
+ year: 'year',
+};
export function normalizeUnits(units) {
return typeof units === 'string'
addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
-
// PARSING
addRegexToken('DDD', match1to3);
return this.millisecond() * 1000000;
});
-
// PARSING
addRegexToken('S', match1to3, match1);
addFormatToken('m', ['mm', 2], 0, 'minute');
-
// PARSING
addRegexToken('m', match1to2);
return this.localeData().months(this, format);
});
-
// PARSING
addRegexToken('M', match1to2);
isoWeekYear: 1,
week: 5,
isoWeek: 5,
- year: 1
-}
+ year: 1,
+};
export function getPrioritizedUnits(unitsObj) {
var units = [],
addFormatToken('s', ['ss', 2], 0, 'second');
-
// PARSING
addRegexToken('s', match1to2);
// ALIASES
-
// PARSING
addRegexToken('G', matchSigned);
addFormatToken('w', ['ww', 2], 'wo', 'week');
addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
-
// PARSING
addRegexToken('w', match1to2);