cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

minute.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 { MINUTE } from './constants';
     11
     12// FORMATTING
     13
     14addFormatToken('m', ['mm', 2], 0, 'minute');
     15
     16// PARSING
     17
     18addRegexToken('m', match1to2, match1to2HasZero);
     19addRegexToken('mm', match1to2, match2);
     20addParseToken(['m', 'mm'], MINUTE);
     21
     22// MOMENTS
     23
     24export var getSetMinute = makeGetSet('Minutes', false);