PATH:
usr
/
local
/
lib
/
node_modules
/
pm2
/
node_modules
/
moment
/
src
/
lib
/
units
import { addFormatToken } from '../format/format'; import { addUnitAlias } from './aliases'; import { addUnitPriority } from './priorities'; import { addRegexToken, match3, match1to3 } from '../parse/regex'; import { daysInYear } from './year'; import { createUTCDate } from '../create/date-from-array'; import { addParseToken } from '../parse/token'; import toInt from '../utils/to-int'; // FORMATTING addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES addUnitAlias('dayOfYear', 'DDD'); // PRIORITY addUnitPriority('dayOfYear', 4); // PARSING addRegexToken('DDD', match1to3); addRegexToken('DDDD', match3); addParseToken(['DDD', 'DDDD'], function (input, array, config) { config._dayOfYear = toInt(input); }); // HELPERS // MOMENTS export function getSetDayOfYear (input) { var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); }
[-] month.js
[edit]
[-] minute.js
[edit]
[-] week.js
[edit]
[-] timestamp.js
[edit]
[-] quarter.js
[edit]
[-] second.js
[edit]
[+]
..
[-] offset.js
[edit]
[-] week-year.js
[edit]
[-] day-of-month.js
[edit]
[-] priorities.js
[edit]
[-] timezone.js
[edit]
[-] year.js
[edit]
[-] week-calendar-utils.js
[edit]
[-] day-of-week.js
[edit]
[-] millisecond.js
[edit]
[-] day-of-year.js
[edit]
[-] aliases.js
[edit]
[-] hour.js
[edit]
[-] constants.js
[edit]
[-] units.js
[edit]