aboutsummaryrefslogtreecommitdiff
path: root/node_modules/moment/src/lib/units/day-of-year.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/moment/src/lib/units/day-of-year.js')
-rw-r--r--node_modules/moment/src/lib/units/day-of-year.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/node_modules/moment/src/lib/units/day-of-year.js b/node_modules/moment/src/lib/units/day-of-year.js
deleted file mode 100644
index 9aecb5b..0000000
--- a/node_modules/moment/src/lib/units/day-of-year.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import { addFormatToken } from '../format/format';
-import { addUnitAlias } from './aliases';
-import { addUnitPriority } from './priorities';
-import { addRegexToken, match3, match1to3 } from '../parse/regex';
-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');
-}