/var/www/greso.tech/server/nsm/node_modules/moment/src/lib/units
NameSizeModeActions
aliases.js8090644editdlrm
constants.js1480644editdlrm
day-of-month.js10650644editdlrm
day-of-week.js129040644editdlrm
day-of-year.js9200644editdlrm
era.js79840644editdlrm
hour.js44750644editdlrm
millisecond.js18700644editdlrm
minute.js6790644editdlrm
month.js100210644editdlrm
offset.js70700644editdlrm
priorities.js4800644editdlrm
quarter.js7800644editdlrm
second.js6790644editdlrm
timestamp.js5900644editdlrm
timezone.js3250644editdlrm
units.js4040644editdlrm
week-calendar-utils.js21070644editdlrm
week-year.js34830644editdlrm
week.js16640644editdlrm
year.js20010644editdlrm
Edit: /var/www/greso.tech/server/nsm/node_modules/moment/src/lib/units/week.js (1664B)
import { addFormatToken } from '../format/format'; import { addUnitAlias } from './aliases'; import { addUnitPriority } from './priorities'; import { addRegexToken, match1to2, match2 } from '../parse/regex'; import { addWeekParseToken } from '../parse/token'; import toInt from '../utils/to-int'; import { weekOfYear } from './week-calendar-utils'; // FORMATTING addFormatToken('w', ['ww', 2], 'wo', 'week'); addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES addUnitAlias('week', 'w'); addUnitAlias('isoWeek', 'W'); // PRIORITIES addUnitPriority('week', 5); addUnitPriority('isoWeek', 5); // PARSING addRegexToken('w', match1to2); addRegexToken('ww', match1to2, match2); addRegexToken('W', match1to2); addRegexToken('WW', match1to2, match2); addWeekParseToken( ['w', 'ww', 'W', 'WW'], function (input, week, config, token) { week[token.substr(0, 1)] = toInt(input); } ); // HELPERS // LOCALES export function localeWeek(mom) { return weekOfYear(mom, this._week.dow, this._week.doy).week; } export var defaultLocaleWeek = { dow: 0, // Sunday is the first day of the week. doy: 6, // The week that contains Jan 6th is the first week of the year. }; export function localeFirstDayOfWeek() { return this._week.dow; } export function localeFirstDayOfYear() { return this._week.doy; } // MOMENTS export function getSetWeek(input) { var week = this.localeData().week(this); return input == null ? week : this.add((input - week) * 7, 'd'); } export function getSetISOWeek(input) { var week = weekOfYear(this, 1, 4).week; return input == null ? week : this.add((input - week) * 7, 'd'); }