second.js (555B)
1import { makeGetSet } from '../moment/get-set'; 2import { addFormatToken } from '../format/format'; 3import { 4 addRegexToken, 5 match1to2, 6 match2, 7 match1to2HasZero, 8} from '../parse/regex'; 9import { addParseToken } from '../parse/token'; 10import { SECOND } from './constants'; 11 12// FORMATTING 13 14addFormatToken('s', ['ss', 2], 0, 'second'); 15 16// PARSING 17 18addRegexToken('s', match1to2, match1to2HasZero); 19addRegexToken('ss', match1to2, match2); 20addParseToken(['s', 'ss'], SECOND); 21 22// MOMENTS 23 24export var getSetSecond = makeGetSet('Seconds', false);