cscg24-guacamole

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

prototype.js (2229B)


      1import { Locale } from './constructor';
      2
      3var proto = Locale.prototype;
      4
      5import { calendar } from './calendar';
      6import { longDateFormat } from './formats';
      7import { invalidDate } from './invalid';
      8import { ordinal } from './ordinal';
      9import { preParsePostFormat } from './pre-post-format';
     10import { relativeTime, pastFuture } from './relative';
     11import { set } from './set';
     12
     13proto.calendar = calendar;
     14proto.longDateFormat = longDateFormat;
     15proto.invalidDate = invalidDate;
     16proto.ordinal = ordinal;
     17proto.preparse = preParsePostFormat;
     18proto.postformat = preParsePostFormat;
     19proto.relativeTime = relativeTime;
     20proto.pastFuture = pastFuture;
     21proto.set = set;
     22
     23// Eras
     24import {
     25    localeEras,
     26    localeErasParse,
     27    localeErasConvertYear,
     28    erasAbbrRegex,
     29    erasNameRegex,
     30    erasNarrowRegex,
     31} from '../units/era';
     32proto.eras = localeEras;
     33proto.erasParse = localeErasParse;
     34proto.erasConvertYear = localeErasConvertYear;
     35proto.erasAbbrRegex = erasAbbrRegex;
     36proto.erasNameRegex = erasNameRegex;
     37proto.erasNarrowRegex = erasNarrowRegex;
     38
     39// Month
     40import {
     41    localeMonthsParse,
     42    localeMonths,
     43    localeMonthsShort,
     44    monthsRegex,
     45    monthsShortRegex,
     46} from '../units/month';
     47
     48proto.months = localeMonths;
     49proto.monthsShort = localeMonthsShort;
     50proto.monthsParse = localeMonthsParse;
     51proto.monthsRegex = monthsRegex;
     52proto.monthsShortRegex = monthsShortRegex;
     53
     54// Week
     55import {
     56    localeWeek,
     57    localeFirstDayOfYear,
     58    localeFirstDayOfWeek,
     59} from '../units/week';
     60proto.week = localeWeek;
     61proto.firstDayOfYear = localeFirstDayOfYear;
     62proto.firstDayOfWeek = localeFirstDayOfWeek;
     63
     64// Day of Week
     65import {
     66    localeWeekdaysParse,
     67    localeWeekdays,
     68    localeWeekdaysMin,
     69    localeWeekdaysShort,
     70    weekdaysRegex,
     71    weekdaysShortRegex,
     72    weekdaysMinRegex,
     73} from '../units/day-of-week';
     74
     75proto.weekdays = localeWeekdays;
     76proto.weekdaysMin = localeWeekdaysMin;
     77proto.weekdaysShort = localeWeekdaysShort;
     78proto.weekdaysParse = localeWeekdaysParse;
     79
     80proto.weekdaysRegex = weekdaysRegex;
     81proto.weekdaysShortRegex = weekdaysShortRegex;
     82proto.weekdaysMinRegex = weekdaysMinRegex;
     83
     84// Hours
     85import { localeIsPM, localeMeridiem } from '../units/hour';
     86
     87proto.isPM = localeIsPM;
     88proto.meridiem = localeMeridiem;