You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
679 B
30 lines
679 B
|
3 years ago
|
import { makeGetSet } from '../moment/get-set';
|
||
|
|
import { addFormatToken } from '../format/format';
|
||
|
|
import { addUnitAlias } from './aliases';
|
||
|
|
import { addUnitPriority } from './priorities';
|
||
|
|
import { addRegexToken, match1to2, match2 } from '../parse/regex';
|
||
|
|
import { addParseToken } from '../parse/token';
|
||
|
|
import { MINUTE } from './constants';
|
||
|
|
|
||
|
|
// FORMATTING
|
||
|
|
|
||
|
|
addFormatToken('m', ['mm', 2], 0, 'minute');
|
||
|
|
|
||
|
|
// ALIASES
|
||
|
|
|
||
|
|
addUnitAlias('minute', 'm');
|
||
|
|
|
||
|
|
// PRIORITY
|
||
|
|
|
||
|
|
addUnitPriority('minute', 14);
|
||
|
|
|
||
|
|
// PARSING
|
||
|
|
|
||
|
|
addRegexToken('m', match1to2);
|
||
|
|
addRegexToken('mm', match1to2, match2);
|
||
|
|
addParseToken(['m', 'mm'], MINUTE);
|
||
|
|
|
||
|
|
// MOMENTS
|
||
|
|
|
||
|
|
export var getSetMinute = makeGetSet('Minutes', false);
|