/home/techb158/ileadtechnology.com/public/admin/bower_components/moment/src/lib/units
NameSizeModeActions
aliases.js7950644editdlrm
constants.js2040644editdlrm
day-of-month.js10640644editdlrm
day-of-week.js119700644editdlrm
day-of-year.js9900644editdlrm
hour.js43590644editdlrm
index.php530644editdlrm
millisecond.js18240644editdlrm
minute.js6800644editdlrm
month.js93930644editdlrm
offset.js68720644editdlrm
priorities.js3690644editdlrm
quarter.js7630644editdlrm
second.js6800644editdlrm
timestamp.js5940644editdlrm
timezone.js3280644editdlrm
units.js4040644editdlrm
week-calendar-utils.js21360644editdlrm
week-year.js32150644editdlrm
week.js17020644editdlrm
year.js19680644editdlrm
Edit: /home/techb158/ileadtechnology.com/public/admin/bower_components/moment/src/lib/units/week.js (1702B)
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 { createLocal } from '../create/local'; 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 1st 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'); }