aboutsummaryrefslogtreecommitdiffstats
path: root/library/moment/src/lib/units/hour.js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-11-18 23:56:25 +0100
committerMario Vavti <mario@mariovavti.com>2015-11-18 23:56:25 +0100
commitb23284cba28335f61595f2264685b1bbafc19183 (patch)
tree696cbfc2b5a609c636e0d1d7a3a2f9ad7a302266 /library/moment/src/lib/units/hour.js
parent0c163c4d038a4c26335af1bde366d8ef9e53c464 (diff)
downloadvolse-hubzilla-b23284cba28335f61595f2264685b1bbafc19183.tar.gz
volse-hubzilla-b23284cba28335f61595f2264685b1bbafc19183.tar.bz2
volse-hubzilla-b23284cba28335f61595f2264685b1bbafc19183.zip
move moment.min.js and remove unneeded files
Diffstat (limited to 'library/moment/src/lib/units/hour.js')
-rw-r--r--library/moment/src/lib/units/hour.js77
1 files changed, 0 insertions, 77 deletions
diff --git a/library/moment/src/lib/units/hour.js b/library/moment/src/lib/units/hour.js
deleted file mode 100644
index 356c74d23..000000000
--- a/library/moment/src/lib/units/hour.js
+++ /dev/null
@@ -1,77 +0,0 @@
-import { makeGetSet } from '../moment/get-set';
-import { addFormatToken } from '../format/format';
-import { addUnitAlias } from './aliases';
-import { addRegexToken, match1to2, match2 } from '../parse/regex';
-import { addParseToken } from '../parse/token';
-import { HOUR } from './constants';
-import toInt from '../utils/to-int';
-import getParsingFlags from '../create/parsing-flags';
-
-// FORMATTING
-
-addFormatToken('H', ['HH', 2], 0, 'hour');
-addFormatToken('h', ['hh', 2], 0, function () {
- return this.hours() % 12 || 12;
-});
-
-function meridiem (token, lowercase) {
- addFormatToken(token, 0, 0, function () {
- return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
- });
-}
-
-meridiem('a', true);
-meridiem('A', false);
-
-// ALIASES
-
-addUnitAlias('hour', 'h');
-
-// PARSING
-
-function matchMeridiem (isStrict, locale) {
- return locale._meridiemParse;
-}
-
-addRegexToken('a', matchMeridiem);
-addRegexToken('A', matchMeridiem);
-addRegexToken('H', match1to2);
-addRegexToken('h', match1to2);
-addRegexToken('HH', match1to2, match2);
-addRegexToken('hh', match1to2, match2);
-
-addParseToken(['H', 'HH'], HOUR);
-addParseToken(['a', 'A'], function (input, array, config) {
- config._isPm = config._locale.isPM(input);
- config._meridiem = input;
-});
-addParseToken(['h', 'hh'], function (input, array, config) {
- array[HOUR] = toInt(input);
- getParsingFlags(config).bigHour = true;
-});
-
-// LOCALES
-
-export function localeIsPM (input) {
- // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
- // Using charAt should be more compatible.
- return ((input + '').toLowerCase().charAt(0) === 'p');
-}
-
-export var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
-export function localeMeridiem (hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'pm' : 'PM';
- } else {
- return isLower ? 'am' : 'AM';
- }
-}
-
-
-// MOMENTS
-
-// Setting the hour should keep the time, because the user explicitly
-// specified which hour he wants. So trying to maintain the same hour (in
-// a new timezone) makes sense. Adding/subtracting hours does not follow
-// this rule.
-export var getSetHour = makeGetSet('Hours', true);