Commit 12e73bf0f16b0e58dc9a37a3fa0d06931e9c2598
1 parent
8de1b08d
cocreation updates
Showing
34 changed files
with
17061 additions
and
0 deletions
bower_components/moment-element/.gitignore
0 → 100644
| 1 | +bower_components/ | ... | ... |
bower_components/moment-element/.travis.yml
0 → 100644
bower_components/moment-element/README.md
0 → 100644
| 1 | +[](https://travis-ci.org/abdonrd/moment-element) | |
| 2 | + | |
| 3 | +_[Demo and API docs](https://abdonrd.github.io/moment-element/)_ | |
| 4 | + | |
| 5 | +## <moment-element> | |
| 6 | + | |
| 7 | +Polymer element wrapper for the [moment](https://github.com/moment/moment) library. | |
| 8 | + | |
| 9 | +### Install | |
| 10 | + | |
| 11 | +```sh | |
| 12 | +bower install moment-element | |
| 13 | +``` | |
| 14 | + | |
| 15 | +### Use | |
| 16 | + | |
| 17 | +```html | |
| 18 | +<moment-element></moment-element> | |
| 19 | +<moment-element datetime="1991-12-31" output-format="MMM DD[,] YYYY"></moment-element> | |
| 20 | +``` | ... | ... |
bower_components/moment-element/bower.json
0 → 100644
| 1 | +{ | |
| 2 | + "name": "moment-element", | |
| 3 | + "version": "0.3.0", | |
| 4 | + "authors": [ | |
| 5 | + "Abdón Rodríguez Davila <a@abdonrd.com>" | |
| 6 | + ], | |
| 7 | + "description": "Polymer element wrapper for the moment library", | |
| 8 | + "keywords": [ | |
| 9 | + "web-component", | |
| 10 | + "polymer", | |
| 11 | + "moment", | |
| 12 | + "date", | |
| 13 | + "time", | |
| 14 | + "parse", | |
| 15 | + "format" | |
| 16 | + ], | |
| 17 | + "main": "moment-element.html", | |
| 18 | + "repository": { | |
| 19 | + "type": "git", | |
| 20 | + "url": "git://github.com/abdonrd/moment-element.git" | |
| 21 | + }, | |
| 22 | + "license": "MIT", | |
| 23 | + "homepage": "https://github.com/abdonrd/moment-element", | |
| 24 | + "ignore": [ | |
| 25 | + "/.*", | |
| 26 | + "/test/" | |
| 27 | + ], | |
| 28 | + "dependencies": { | |
| 29 | + "polymer": "Polymer/polymer#^1.2.0", | |
| 30 | + "moment": "~2.11.2" | |
| 31 | + }, | |
| 32 | + "devDependencies": { | |
| 33 | + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", | |
| 34 | + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", | |
| 35 | + "web-component-tester": "^3.4.0" | |
| 36 | + } | |
| 37 | +} | ... | ... |
bower_components/moment-element/demo/index.html
0 → 100644
| 1 | +<!doctype html> | |
| 2 | +<!-- | |
| 3 | +@license | |
| 4 | +Copyright (c) 2015 Abdón Rodríguez Davila (@abdonrd). All rights reserved. | |
| 5 | +This code may only be used under the MIT license. | |
| 6 | +--> | |
| 7 | +<html> | |
| 8 | + <head> | |
| 9 | + <meta charset="utf-8"> | |
| 10 | + <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> | |
| 11 | + <title>momentjs-element demo</title> | |
| 12 | + | |
| 13 | + <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script> | |
| 14 | + | |
| 15 | + <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html"> | |
| 16 | + <link rel="import" href="../../iron-demo-helpers/demo-snippet.html"> | |
| 17 | + <link rel="import" href="../moment-element.html"> | |
| 18 | + | |
| 19 | + <style is="custom-style" include="demo-pages-shared-styles"> | |
| 20 | + .vertical-section-container { | |
| 21 | + max-width: 550px; | |
| 22 | + } | |
| 23 | + | |
| 24 | + moment-element { | |
| 25 | + display: block; | |
| 26 | + } | |
| 27 | + </style> | |
| 28 | + </head> | |
| 29 | + <body unresolved> | |
| 30 | + <div class="vertical-section-container centered"> | |
| 31 | + <h3>Current date and date from string (ISO 8601 and another)</h3> | |
| 32 | + <demo-snippet> | |
| 33 | + <template> | |
| 34 | + <moment-element></moment-element> | |
| 35 | + <moment-element datetime="1991-12-31"></moment-element> | |
| 36 | + <moment-element datetime="12-31-1991" input-format="MM-DD-YYYY"></moment-element> | |
| 37 | + </template> | |
| 38 | + </demo-snippet> | |
| 39 | + | |
| 40 | + <h3>Date from string + format</h3> | |
| 41 | + <demo-snippet> | |
| 42 | + <template> | |
| 43 | + <moment-element datetime="1991-12-31" output-format="l"></moment-element> | |
| 44 | + <moment-element datetime="12-31-1991" input-format="MM-DD-YYYY" output-format="l"></moment-element> | |
| 45 | + <moment-element datetime="1991-12-31" output-format="MMM DD[,] YYYY"></moment-element> | |
| 46 | + </template> | |
| 47 | + </demo-snippet> | |
| 48 | + | |
| 49 | + <h3>Date from now or from custom date</h3> | |
| 50 | + <demo-snippet> | |
| 51 | + <template> | |
| 52 | + <moment-element datetime="1991-12-31" from="now"></moment-element> | |
| 53 | + <moment-element datetime="1991-12-31" from="2003-06-23"></moment-element> | |
| 54 | + </template> | |
| 55 | + </demo-snippet> | |
| 56 | + | |
| 57 | + <h3>Date to now or to custom date</h3> | |
| 58 | + <demo-snippet> | |
| 59 | + <template> | |
| 60 | + <moment-element datetime="1991-12-31" to="now"></moment-element> | |
| 61 | + <moment-element datetime="1991-12-31" to="2003-06-23"></moment-element> | |
| 62 | + </template> | |
| 63 | + </demo-snippet> | |
| 64 | + </div> | |
| 65 | + </body> | |
| 66 | +</html> | ... | ... |
bower_components/moment-element/index.html
0 → 100644
| 1 | +<!doctype html> | |
| 2 | +<!-- | |
| 3 | +@license | |
| 4 | +Copyright (c) 2015 Abdón Rodríguez Davila (@abdonrd). All rights reserved. | |
| 5 | +This code may only be used under the MIT license. | |
| 6 | +--> | |
| 7 | +<html> | |
| 8 | + <head> | |
| 9 | + <meta charset="utf-8"> | |
| 10 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| 11 | + | |
| 12 | + <script src="../webcomponentsjs/webcomponents-lite.js"></script> | |
| 13 | + | |
| 14 | + <link rel="import" href="../iron-component-page/iron-component-page.html"> | |
| 15 | + </head> | |
| 16 | + <body unresolved> | |
| 17 | + <iron-component-page></iron-component-page> | |
| 18 | + </body> | |
| 19 | +</html> | ... | ... |
bower_components/moment-element/moment-element.html
0 → 100644
| 1 | +<!-- | |
| 2 | +@license | |
| 3 | +Copyright (c) 2015 Abdón Rodríguez Davila (@abdonrd). All rights reserved. | |
| 4 | +This code may only be used under the MIT license. | |
| 5 | +--> | |
| 6 | + | |
| 7 | +<link rel="import" href="../polymer/polymer.html"> | |
| 8 | +<link rel="import" href="moment-import.html"> | |
| 9 | + | |
| 10 | +<!-- | |
| 11 | +Polymer element wrapper for the [moment](https://github.com/moment/moment) library. | |
| 12 | + | |
| 13 | +Examples: | |
| 14 | + | |
| 15 | + <moment-element></moment-element> | |
| 16 | + <moment-element datetime="1991-12-31" output-format="MMM DD[,] YYYY"></moment-element> | |
| 17 | + | |
| 18 | +@demo demo/index.html | |
| 19 | +--> | |
| 20 | + | |
| 21 | +<dom-module id="moment-element"> | |
| 22 | + <template> | |
| 23 | + | |
| 24 | + </template> | |
| 25 | + | |
| 26 | + <script> | |
| 27 | + Polymer({ | |
| 28 | + is: 'moment-element', | |
| 29 | + | |
| 30 | + properties: { | |
| 31 | + /** | |
| 32 | + * The input datetime. If don't set the datetime, the datetime will be now. | |
| 33 | + * For consistent results, parsing anything other than ISO 8601 strings | |
| 34 | + * with the `inputFormat` property. More information in [moment String](http://momentjs.com/docs/#/parsing/string/). | |
| 35 | + */ | |
| 36 | + datetime: String, | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * The datetime input format. An string using the | |
| 40 | + * [moment String + Format](http://momentjs.com/docs/#/parsing/string-format/). | |
| 41 | + */ | |
| 42 | + inputFormat: String, | |
| 43 | + | |
| 44 | + /** | |
| 45 | + * The datetime output format. Options are 'now' or datetime using the | |
| 46 | + * [moment Format](http://momentjs.com/docs/#/displaying/format/). | |
| 47 | + */ | |
| 48 | + outputFormat: String, | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * Relative time using [momen time from now](http://momentjs.com/docs/#/displaying/fromnow/) | |
| 52 | + * or [momen Time from datetime](http://momentjs.com/docs/#/displaying/from/). | |
| 53 | + */ | |
| 54 | + from: String, | |
| 55 | + | |
| 56 | + /** | |
| 57 | + * Relative time using [momen Time to now](http://momentjs.com/docs/#/displaying/tonow/) | |
| 58 | + * or [momen Time to datetime](http://momentjs.com/docs/#/displaying/to/). | |
| 59 | + */ | |
| 60 | + to: String, | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * The output datetime. | |
| 64 | + */ | |
| 65 | + output: String | |
| 66 | + }, | |
| 67 | + | |
| 68 | + ready: function() { | |
| 69 | + this.output = this._initializeMoment(); | |
| 70 | + | |
| 71 | + if (this.from) { | |
| 72 | + this.output = this._getFrom(); | |
| 73 | + } else if (this.to) { | |
| 74 | + this.output = this._getTo(); | |
| 75 | + } | |
| 76 | + | |
| 77 | + Polymer.dom(this.root).innerHTML = this.output; | |
| 78 | + }, | |
| 79 | + | |
| 80 | + _initializeMoment: function() { | |
| 81 | + if (this.datetime && this.inputFormat) { | |
| 82 | + var output = moment(this.datetime, this.inputFormat); | |
| 83 | + } else if (this.datetime) { | |
| 84 | + var output = moment(this.datetime); | |
| 85 | + } else { | |
| 86 | + var output = moment(); | |
| 87 | + } | |
| 88 | + | |
| 89 | + if (this.outputFormat) { | |
| 90 | + return output.format(this.outputFormat); | |
| 91 | + } else { | |
| 92 | + return output; | |
| 93 | + } | |
| 94 | + }, | |
| 95 | + | |
| 96 | + _getFrom: function() { | |
| 97 | + if (this.from === 'now') { | |
| 98 | + return this.output.fromNow(); | |
| 99 | + } else { | |
| 100 | + return this.output.from(moment(this.from)); | |
| 101 | + } | |
| 102 | + }, | |
| 103 | + | |
| 104 | + _getTo: function() { | |
| 105 | + if (this.to === 'now') { | |
| 106 | + return this.output.toNow(); | |
| 107 | + } else { | |
| 108 | + return this.output.to(moment(this.to)); | |
| 109 | + } | |
| 110 | + } | |
| 111 | + }); | |
| 112 | + </script> | |
| 113 | +</dom-module> | ... | ... |
bower_components/moment-element/moment-import.html
0 → 100644
bower_components/moment-element/moment-with-locales-import.html
0 → 100644
| 1 | +<script src='moment/moment-with-locales.js'></script> | ... | ... |
bower_components/moment-element/moment/moment-with-locales-import.html
0 → 100644
| 1 | +<script src='../moment/min/moment-with-locales.min.js'></script> | ... | ... |
bower_components/moment-element/moment/moment-with-locales.js
0 → 100644
Changes suppressed. Click to show
| 1 | +;(function (global, factory) { | |
| 2 | + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | |
| 3 | + typeof define === 'function' && define.amd ? define(factory) : | |
| 4 | + global.moment = factory() | |
| 5 | +}(this, function () { 'use strict'; | |
| 6 | + | |
| 7 | + var hookCallback; | |
| 8 | + | |
| 9 | + function utils_hooks__hooks () { | |
| 10 | + return hookCallback.apply(null, arguments); | |
| 11 | + } | |
| 12 | + | |
| 13 | + // This is done to register the method called with moment() | |
| 14 | + // without creating circular dependencies. | |
| 15 | + function setHookCallback (callback) { | |
| 16 | + hookCallback = callback; | |
| 17 | + } | |
| 18 | + | |
| 19 | + function isArray(input) { | |
| 20 | + return Object.prototype.toString.call(input) === '[object Array]'; | |
| 21 | + } | |
| 22 | + | |
| 23 | + function isDate(input) { | |
| 24 | + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; | |
| 25 | + } | |
| 26 | + | |
| 27 | + function map(arr, fn) { | |
| 28 | + var res = [], i; | |
| 29 | + for (i = 0; i < arr.length; ++i) { | |
| 30 | + res.push(fn(arr[i], i)); | |
| 31 | + } | |
| 32 | + return res; | |
| 33 | + } | |
| 34 | + | |
| 35 | + function hasOwnProp(a, b) { | |
| 36 | + return Object.prototype.hasOwnProperty.call(a, b); | |
| 37 | + } | |
| 38 | + | |
| 39 | + function extend(a, b) { | |
| 40 | + for (var i in b) { | |
| 41 | + if (hasOwnProp(b, i)) { | |
| 42 | + a[i] = b[i]; | |
| 43 | + } | |
| 44 | + } | |
| 45 | + | |
| 46 | + if (hasOwnProp(b, 'toString')) { | |
| 47 | + a.toString = b.toString; | |
| 48 | + } | |
| 49 | + | |
| 50 | + if (hasOwnProp(b, 'valueOf')) { | |
| 51 | + a.valueOf = b.valueOf; | |
| 52 | + } | |
| 53 | + | |
| 54 | + return a; | |
| 55 | + } | |
| 56 | + | |
| 57 | + function create_utc__createUTC (input, format, locale, strict) { | |
| 58 | + return createLocalOrUTC(input, format, locale, strict, true).utc(); | |
| 59 | + } | |
| 60 | + | |
| 61 | + function defaultParsingFlags() { | |
| 62 | + // We need to deep clone this object. | |
| 63 | + return { | |
| 64 | + empty : false, | |
| 65 | + unusedTokens : [], | |
| 66 | + unusedInput : [], | |
| 67 | + overflow : -2, | |
| 68 | + charsLeftOver : 0, | |
| 69 | + nullInput : false, | |
| 70 | + invalidMonth : null, | |
| 71 | + invalidFormat : false, | |
| 72 | + userInvalidated : false, | |
| 73 | + iso : false | |
| 74 | + }; | |
| 75 | + } | |
| 76 | + | |
| 77 | + function getParsingFlags(m) { | |
| 78 | + if (m._pf == null) { | |
| 79 | + m._pf = defaultParsingFlags(); | |
| 80 | + } | |
| 81 | + return m._pf; | |
| 82 | + } | |
| 83 | + | |
| 84 | + function valid__isValid(m) { | |
| 85 | + if (m._isValid == null) { | |
| 86 | + var flags = getParsingFlags(m); | |
| 87 | + m._isValid = !isNaN(m._d.getTime()) && | |
| 88 | + flags.overflow < 0 && | |
| 89 | + !flags.empty && | |
| 90 | + !flags.invalidMonth && | |
| 91 | + !flags.invalidWeekday && | |
| 92 | + !flags.nullInput && | |
| 93 | + !flags.invalidFormat && | |
| 94 | + !flags.userInvalidated; | |
| 95 | + | |
| 96 | + if (m._strict) { | |
| 97 | + m._isValid = m._isValid && | |
| 98 | + flags.charsLeftOver === 0 && | |
| 99 | + flags.unusedTokens.length === 0 && | |
| 100 | + flags.bigHour === undefined; | |
| 101 | + } | |
| 102 | + } | |
| 103 | + return m._isValid; | |
| 104 | + } | |
| 105 | + | |
| 106 | + function valid__createInvalid (flags) { | |
| 107 | + var m = create_utc__createUTC(NaN); | |
| 108 | + if (flags != null) { | |
| 109 | + extend(getParsingFlags(m), flags); | |
| 110 | + } | |
| 111 | + else { | |
| 112 | + getParsingFlags(m).userInvalidated = true; | |
| 113 | + } | |
| 114 | + | |
| 115 | + return m; | |
| 116 | + } | |
| 117 | + | |
| 118 | + function isUndefined(input) { | |
| 119 | + return input === void 0; | |
| 120 | + } | |
| 121 | + | |
| 122 | + // Plugins that add properties should also add the key here (null value), | |
| 123 | + // so we can properly clone ourselves. | |
| 124 | + var momentProperties = utils_hooks__hooks.momentProperties = []; | |
| 125 | + | |
| 126 | + function copyConfig(to, from) { | |
| 127 | + var i, prop, val; | |
| 128 | + | |
| 129 | + if (!isUndefined(from._isAMomentObject)) { | |
| 130 | + to._isAMomentObject = from._isAMomentObject; | |
| 131 | + } | |
| 132 | + if (!isUndefined(from._i)) { | |
| 133 | + to._i = from._i; | |
| 134 | + } | |
| 135 | + if (!isUndefined(from._f)) { | |
| 136 | + to._f = from._f; | |
| 137 | + } | |
| 138 | + if (!isUndefined(from._l)) { | |
| 139 | + to._l = from._l; | |
| 140 | + } | |
| 141 | + if (!isUndefined(from._strict)) { | |
| 142 | + to._strict = from._strict; | |
| 143 | + } | |
| 144 | + if (!isUndefined(from._tzm)) { | |
| 145 | + to._tzm = from._tzm; | |
| 146 | + } | |
| 147 | + if (!isUndefined(from._isUTC)) { | |
| 148 | + to._isUTC = from._isUTC; | |
| 149 | + } | |
| 150 | + if (!isUndefined(from._offset)) { | |
| 151 | + to._offset = from._offset; | |
| 152 | + } | |
| 153 | + if (!isUndefined(from._pf)) { | |
| 154 | + to._pf = getParsingFlags(from); | |
| 155 | + } | |
| 156 | + if (!isUndefined(from._locale)) { | |
| 157 | + to._locale = from._locale; | |
| 158 | + } | |
| 159 | + | |
| 160 | + if (momentProperties.length > 0) { | |
| 161 | + for (i in momentProperties) { | |
| 162 | + prop = momentProperties[i]; | |
| 163 | + val = from[prop]; | |
| 164 | + if (!isUndefined(val)) { | |
| 165 | + to[prop] = val; | |
| 166 | + } | |
| 167 | + } | |
| 168 | + } | |
| 169 | + | |
| 170 | + return to; | |
| 171 | + } | |
| 172 | + | |
| 173 | + var updateInProgress = false; | |
| 174 | + | |
| 175 | + // Moment prototype object | |
| 176 | + function Moment(config) { | |
| 177 | + copyConfig(this, config); | |
| 178 | + this._d = new Date(config._d != null ? config._d.getTime() : NaN); | |
| 179 | + // Prevent infinite loop in case updateOffset creates new moment | |
| 180 | + // objects. | |
| 181 | + if (updateInProgress === false) { | |
| 182 | + updateInProgress = true; | |
| 183 | + utils_hooks__hooks.updateOffset(this); | |
| 184 | + updateInProgress = false; | |
| 185 | + } | |
| 186 | + } | |
| 187 | + | |
| 188 | + function isMoment (obj) { | |
| 189 | + return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); | |
| 190 | + } | |
| 191 | + | |
| 192 | + function absFloor (number) { | |
| 193 | + if (number < 0) { | |
| 194 | + return Math.ceil(number); | |
| 195 | + } else { | |
| 196 | + return Math.floor(number); | |
| 197 | + } | |
| 198 | + } | |
| 199 | + | |
| 200 | + function toInt(argumentForCoercion) { | |
| 201 | + var coercedNumber = +argumentForCoercion, | |
| 202 | + value = 0; | |
| 203 | + | |
| 204 | + if (coercedNumber !== 0 && isFinite(coercedNumber)) { | |
| 205 | + value = absFloor(coercedNumber); | |
| 206 | + } | |
| 207 | + | |
| 208 | + return value; | |
| 209 | + } | |
| 210 | + | |
| 211 | + // compare two arrays, return the number of differences | |
| 212 | + function compareArrays(array1, array2, dontConvert) { | |
| 213 | + var len = Math.min(array1.length, array2.length), | |
| 214 | + lengthDiff = Math.abs(array1.length - array2.length), | |
| 215 | + diffs = 0, | |
| 216 | + i; | |
| 217 | + for (i = 0; i < len; i++) { | |
| 218 | + if ((dontConvert && array1[i] !== array2[i]) || | |
| 219 | + (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { | |
| 220 | + diffs++; | |
| 221 | + } | |
| 222 | + } | |
| 223 | + return diffs + lengthDiff; | |
| 224 | + } | |
| 225 | + | |
| 226 | + function Locale() { | |
| 227 | + } | |
| 228 | + | |
| 229 | + // internal storage for locale config files | |
| 230 | + var locales = {}; | |
| 231 | + var globalLocale; | |
| 232 | + | |
| 233 | + function normalizeLocale(key) { | |
| 234 | + return key ? key.toLowerCase().replace('_', '-') : key; | |
| 235 | + } | |
| 236 | + | |
| 237 | + // pick the locale from the array | |
| 238 | + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each | |
| 239 | + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root | |
| 240 | + function chooseLocale(names) { | |
| 241 | + var i = 0, j, next, locale, split; | |
| 242 | + | |
| 243 | + while (i < names.length) { | |
| 244 | + split = normalizeLocale(names[i]).split('-'); | |
| 245 | + j = split.length; | |
| 246 | + next = normalizeLocale(names[i + 1]); | |
| 247 | + next = next ? next.split('-') : null; | |
| 248 | + while (j > 0) { | |
| 249 | + locale = loadLocale(split.slice(0, j).join('-')); | |
| 250 | + if (locale) { | |
| 251 | + return locale; | |
| 252 | + } | |
| 253 | + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { | |
| 254 | + //the next array item is better than a shallower substring of this one | |
| 255 | + break; | |
| 256 | + } | |
| 257 | + j--; | |
| 258 | + } | |
| 259 | + i++; | |
| 260 | + } | |
| 261 | + return null; | |
| 262 | + } | |
| 263 | + | |
| 264 | + function loadLocale(name) { | |
| 265 | + var oldLocale = null; | |
| 266 | + // TODO: Find a better way to register and load all the locales in Node | |
| 267 | + if (!locales[name] && (typeof module !== 'undefined') && | |
| 268 | + module && module.exports) { | |
| 269 | + try { | |
| 270 | + oldLocale = globalLocale._abbr; | |
| 271 | + require('./locale/' + name); | |
| 272 | + // because defineLocale currently also sets the global locale, we | |
| 273 | + // want to undo that for lazy loaded locales | |
| 274 | + locale_locales__getSetGlobalLocale(oldLocale); | |
| 275 | + } catch (e) { } | |
| 276 | + } | |
| 277 | + return locales[name]; | |
| 278 | + } | |
| 279 | + | |
| 280 | + // This function will load locale and then set the global locale. If | |
| 281 | + // no arguments are passed in, it will simply return the current global | |
| 282 | + // locale key. | |
| 283 | + function locale_locales__getSetGlobalLocale (key, values) { | |
| 284 | + var data; | |
| 285 | + if (key) { | |
| 286 | + if (isUndefined(values)) { | |
| 287 | + data = locale_locales__getLocale(key); | |
| 288 | + } | |
| 289 | + else { | |
| 290 | + data = defineLocale(key, values); | |
| 291 | + } | |
| 292 | + | |
| 293 | + if (data) { | |
| 294 | + // moment.duration._locale = moment._locale = data; | |
| 295 | + globalLocale = data; | |
| 296 | + } | |
| 297 | + } | |
| 298 | + | |
| 299 | + return globalLocale._abbr; | |
| 300 | + } | |
| 301 | + | |
| 302 | + function defineLocale (name, values) { | |
| 303 | + if (values !== null) { | |
| 304 | + values.abbr = name; | |
| 305 | + locales[name] = locales[name] || new Locale(); | |
| 306 | + locales[name].set(values); | |
| 307 | + | |
| 308 | + // backwards compat for now: also set the locale | |
| 309 | + locale_locales__getSetGlobalLocale(name); | |
| 310 | + | |
| 311 | + return locales[name]; | |
| 312 | + } else { | |
| 313 | + // useful for testing | |
| 314 | + delete locales[name]; | |
| 315 | + return null; | |
| 316 | + } | |
| 317 | + } | |
| 318 | + | |
| 319 | + // returns locale data | |
| 320 | + function locale_locales__getLocale (key) { | |
| 321 | + var locale; | |
| 322 | + | |
| 323 | + if (key && key._locale && key._locale._abbr) { | |
| 324 | + key = key._locale._abbr; | |
| 325 | + } | |
| 326 | + | |
| 327 | + if (!key) { | |
| 328 | + return globalLocale; | |
| 329 | + } | |
| 330 | + | |
| 331 | + if (!isArray(key)) { | |
| 332 | + //short-circuit everything else | |
| 333 | + locale = loadLocale(key); | |
| 334 | + if (locale) { | |
| 335 | + return locale; | |
| 336 | + } | |
| 337 | + key = [key]; | |
| 338 | + } | |
| 339 | + | |
| 340 | + return chooseLocale(key); | |
| 341 | + } | |
| 342 | + | |
| 343 | + var aliases = {}; | |
| 344 | + | |
| 345 | + function addUnitAlias (unit, shorthand) { | |
| 346 | + var lowerCase = unit.toLowerCase(); | |
| 347 | + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; | |
| 348 | + } | |
| 349 | + | |
| 350 | + function normalizeUnits(units) { | |
| 351 | + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; | |
| 352 | + } | |
| 353 | + | |
| 354 | + function normalizeObjectUnits(inputObject) { | |
| 355 | + var normalizedInput = {}, | |
| 356 | + normalizedProp, | |
| 357 | + prop; | |
| 358 | + | |
| 359 | + for (prop in inputObject) { | |
| 360 | + if (hasOwnProp(inputObject, prop)) { | |
| 361 | + normalizedProp = normalizeUnits(prop); | |
| 362 | + if (normalizedProp) { | |
| 363 | + normalizedInput[normalizedProp] = inputObject[prop]; | |
| 364 | + } | |
| 365 | + } | |
| 366 | + } | |
| 367 | + | |
| 368 | + return normalizedInput; | |
| 369 | + } | |
| 370 | + | |
| 371 | + function isFunction(input) { | |
| 372 | + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; | |
| 373 | + } | |
| 374 | + | |
| 375 | + function makeGetSet (unit, keepTime) { | |
| 376 | + return function (value) { | |
| 377 | + if (value != null) { | |
| 378 | + get_set__set(this, unit, value); | |
| 379 | + utils_hooks__hooks.updateOffset(this, keepTime); | |
| 380 | + return this; | |
| 381 | + } else { | |
| 382 | + return get_set__get(this, unit); | |
| 383 | + } | |
| 384 | + }; | |
| 385 | + } | |
| 386 | + | |
| 387 | + function get_set__get (mom, unit) { | |
| 388 | + return mom.isValid() ? | |
| 389 | + mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; | |
| 390 | + } | |
| 391 | + | |
| 392 | + function get_set__set (mom, unit, value) { | |
| 393 | + if (mom.isValid()) { | |
| 394 | + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); | |
| 395 | + } | |
| 396 | + } | |
| 397 | + | |
| 398 | + // MOMENTS | |
| 399 | + | |
| 400 | + function getSet (units, value) { | |
| 401 | + var unit; | |
| 402 | + if (typeof units === 'object') { | |
| 403 | + for (unit in units) { | |
| 404 | + this.set(unit, units[unit]); | |
| 405 | + } | |
| 406 | + } else { | |
| 407 | + units = normalizeUnits(units); | |
| 408 | + if (isFunction(this[units])) { | |
| 409 | + return this[units](value); | |
| 410 | + } | |
| 411 | + } | |
| 412 | + return this; | |
| 413 | + } | |
| 414 | + | |
| 415 | + function zeroFill(number, targetLength, forceSign) { | |
| 416 | + var absNumber = '' + Math.abs(number), | |
| 417 | + zerosToFill = targetLength - absNumber.length, | |
| 418 | + sign = number >= 0; | |
| 419 | + return (sign ? (forceSign ? '+' : '') : '-') + | |
| 420 | + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; | |
| 421 | + } | |
| 422 | + | |
| 423 | + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; | |
| 424 | + | |
| 425 | + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; | |
| 426 | + | |
| 427 | + var formatFunctions = {}; | |
| 428 | + | |
| 429 | + var formatTokenFunctions = {}; | |
| 430 | + | |
| 431 | + // token: 'M' | |
| 432 | + // padded: ['MM', 2] | |
| 433 | + // ordinal: 'Mo' | |
| 434 | + // callback: function () { this.month() + 1 } | |
| 435 | + function addFormatToken (token, padded, ordinal, callback) { | |
| 436 | + var func = callback; | |
| 437 | + if (typeof callback === 'string') { | |
| 438 | + func = function () { | |
| 439 | + return this[callback](); | |
| 440 | + }; | |
| 441 | + } | |
| 442 | + if (token) { | |
| 443 | + formatTokenFunctions[token] = func; | |
| 444 | + } | |
| 445 | + if (padded) { | |
| 446 | + formatTokenFunctions[padded[0]] = function () { | |
| 447 | + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); | |
| 448 | + }; | |
| 449 | + } | |
| 450 | + if (ordinal) { | |
| 451 | + formatTokenFunctions[ordinal] = function () { | |
| 452 | + return this.localeData().ordinal(func.apply(this, arguments), token); | |
| 453 | + }; | |
| 454 | + } | |
| 455 | + } | |
| 456 | + | |
| 457 | + function removeFormattingTokens(input) { | |
| 458 | + if (input.match(/\[[\s\S]/)) { | |
| 459 | + return input.replace(/^\[|\]$/g, ''); | |
| 460 | + } | |
| 461 | + return input.replace(/\\/g, ''); | |
| 462 | + } | |
| 463 | + | |
| 464 | + function makeFormatFunction(format) { | |
| 465 | + var array = format.match(formattingTokens), i, length; | |
| 466 | + | |
| 467 | + for (i = 0, length = array.length; i < length; i++) { | |
| 468 | + if (formatTokenFunctions[array[i]]) { | |
| 469 | + array[i] = formatTokenFunctions[array[i]]; | |
| 470 | + } else { | |
| 471 | + array[i] = removeFormattingTokens(array[i]); | |
| 472 | + } | |
| 473 | + } | |
| 474 | + | |
| 475 | + return function (mom) { | |
| 476 | + var output = ''; | |
| 477 | + for (i = 0; i < length; i++) { | |
| 478 | + output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; | |
| 479 | + } | |
| 480 | + return output; | |
| 481 | + }; | |
| 482 | + } | |
| 483 | + | |
| 484 | + // format date using native date object | |
| 485 | + function formatMoment(m, format) { | |
| 486 | + if (!m.isValid()) { | |
| 487 | + return m.localeData().invalidDate(); | |
| 488 | + } | |
| 489 | + | |
| 490 | + format = expandFormat(format, m.localeData()); | |
| 491 | + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); | |
| 492 | + | |
| 493 | + return formatFunctions[format](m); | |
| 494 | + } | |
| 495 | + | |
| 496 | + function expandFormat(format, locale) { | |
| 497 | + var i = 5; | |
| 498 | + | |
| 499 | + function replaceLongDateFormatTokens(input) { | |
| 500 | + return locale.longDateFormat(input) || input; | |
| 501 | + } | |
| 502 | + | |
| 503 | + localFormattingTokens.lastIndex = 0; | |
| 504 | + while (i >= 0 && localFormattingTokens.test(format)) { | |
| 505 | + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); | |
| 506 | + localFormattingTokens.lastIndex = 0; | |
| 507 | + i -= 1; | |
| 508 | + } | |
| 509 | + | |
| 510 | + return format; | |
| 511 | + } | |
| 512 | + | |
| 513 | + var match1 = /\d/; // 0 - 9 | |
| 514 | + var match2 = /\d\d/; // 00 - 99 | |
| 515 | + var match3 = /\d{3}/; // 000 - 999 | |
| 516 | + var match4 = /\d{4}/; // 0000 - 9999 | |
| 517 | + var match6 = /[+-]?\d{6}/; // -999999 - 999999 | |
| 518 | + var match1to2 = /\d\d?/; // 0 - 99 | |
| 519 | + var match3to4 = /\d\d\d\d?/; // 999 - 9999 | |
| 520 | + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 | |
| 521 | + var match1to3 = /\d{1,3}/; // 0 - 999 | |
| 522 | + var match1to4 = /\d{1,4}/; // 0 - 9999 | |
| 523 | + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 | |
| 524 | + | |
| 525 | + var matchUnsigned = /\d+/; // 0 - inf | |
| 526 | + var matchSigned = /[+-]?\d+/; // -inf - inf | |
| 527 | + | |
| 528 | + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z | |
| 529 | + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z | |
| 530 | + | |
| 531 | + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 | |
| 532 | + | |
| 533 | + // any word (or two) characters or numbers including two/three word month in arabic. | |
| 534 | + // includes scottish gaelic two word and hyphenated months | |
| 535 | + var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; | |
| 536 | + | |
| 537 | + | |
| 538 | + var regexes = {}; | |
| 539 | + | |
| 540 | + function addRegexToken (token, regex, strictRegex) { | |
| 541 | + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { | |
| 542 | + return (isStrict && strictRegex) ? strictRegex : regex; | |
| 543 | + }; | |
| 544 | + } | |
| 545 | + | |
| 546 | + function getParseRegexForToken (token, config) { | |
| 547 | + if (!hasOwnProp(regexes, token)) { | |
| 548 | + return new RegExp(unescapeFormat(token)); | |
| 549 | + } | |
| 550 | + | |
| 551 | + return regexes[token](config._strict, config._locale); | |
| 552 | + } | |
| 553 | + | |
| 554 | + // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript | |
| 555 | + function unescapeFormat(s) { | |
| 556 | + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { | |
| 557 | + return p1 || p2 || p3 || p4; | |
| 558 | + })); | |
| 559 | + } | |
| 560 | + | |
| 561 | + function regexEscape(s) { | |
| 562 | + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); | |
| 563 | + } | |
| 564 | + | |
| 565 | + var tokens = {}; | |
| 566 | + | |
| 567 | + function addParseToken (token, callback) { | |
| 568 | + var i, func = callback; | |
| 569 | + if (typeof token === 'string') { | |
| 570 | + token = [token]; | |
| 571 | + } | |
| 572 | + if (typeof callback === 'number') { | |
| 573 | + func = function (input, array) { | |
| 574 | + array[callback] = toInt(input); | |
| 575 | + }; | |
| 576 | + } | |
| 577 | + for (i = 0; i < token.length; i++) { | |
| 578 | + tokens[token[i]] = func; | |
| 579 | + } | |
| 580 | + } | |
| 581 | + | |
| 582 | + function addWeekParseToken (token, callback) { | |
| 583 | + addParseToken(token, function (input, array, config, token) { | |
| 584 | + config._w = config._w || {}; | |
| 585 | + callback(input, config._w, config, token); | |
| 586 | + }); | |
| 587 | + } | |
| 588 | + | |
| 589 | + function addTimeToArrayFromToken(token, input, config) { | |
| 590 | + if (input != null && hasOwnProp(tokens, token)) { | |
| 591 | + tokens[token](input, config._a, config, token); | |
| 592 | + } | |
| 593 | + } | |
| 594 | + | |
| 595 | + var YEAR = 0; | |
| 596 | + var MONTH = 1; | |
| 597 | + var DATE = 2; | |
| 598 | + var HOUR = 3; | |
| 599 | + var MINUTE = 4; | |
| 600 | + var SECOND = 5; | |
| 601 | + var MILLISECOND = 6; | |
| 602 | + var WEEK = 7; | |
| 603 | + var WEEKDAY = 8; | |
| 604 | + | |
| 605 | + function daysInMonth(year, month) { | |
| 606 | + return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); | |
| 607 | + } | |
| 608 | + | |
| 609 | + // FORMATTING | |
| 610 | + | |
| 611 | + addFormatToken('M', ['MM', 2], 'Mo', function () { | |
| 612 | + return this.month() + 1; | |
| 613 | + }); | |
| 614 | + | |
| 615 | + addFormatToken('MMM', 0, 0, function (format) { | |
| 616 | + return this.localeData().monthsShort(this, format); | |
| 617 | + }); | |
| 618 | + | |
| 619 | + addFormatToken('MMMM', 0, 0, function (format) { | |
| 620 | + return this.localeData().months(this, format); | |
| 621 | + }); | |
| 622 | + | |
| 623 | + // ALIASES | |
| 624 | + | |
| 625 | + addUnitAlias('month', 'M'); | |
| 626 | + | |
| 627 | + // PARSING | |
| 628 | + | |
| 629 | + addRegexToken('M', match1to2); | |
| 630 | + addRegexToken('MM', match1to2, match2); | |
| 631 | + addRegexToken('MMM', function (isStrict, locale) { | |
| 632 | + return locale.monthsShortRegex(isStrict); | |
| 633 | + }); | |
| 634 | + addRegexToken('MMMM', function (isStrict, locale) { | |
| 635 | + return locale.monthsRegex(isStrict); | |
| 636 | + }); | |
| 637 | + | |
| 638 | + addParseToken(['M', 'MM'], function (input, array) { | |
| 639 | + array[MONTH] = toInt(input) - 1; | |
| 640 | + }); | |
| 641 | + | |
| 642 | + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { | |
| 643 | + var month = config._locale.monthsParse(input, token, config._strict); | |
| 644 | + // if we didn't find a month name, mark the date as invalid. | |
| 645 | + if (month != null) { | |
| 646 | + array[MONTH] = month; | |
| 647 | + } else { | |
| 648 | + getParsingFlags(config).invalidMonth = input; | |
| 649 | + } | |
| 650 | + }); | |
| 651 | + | |
| 652 | + // LOCALES | |
| 653 | + | |
| 654 | + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/; | |
| 655 | + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); | |
| 656 | + function localeMonths (m, format) { | |
| 657 | + return isArray(this._months) ? this._months[m.month()] : | |
| 658 | + this._months[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; | |
| 659 | + } | |
| 660 | + | |
| 661 | + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); | |
| 662 | + function localeMonthsShort (m, format) { | |
| 663 | + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : | |
| 664 | + this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; | |
| 665 | + } | |
| 666 | + | |
| 667 | + function localeMonthsParse (monthName, format, strict) { | |
| 668 | + var i, mom, regex; | |
| 669 | + | |
| 670 | + if (!this._monthsParse) { | |
| 671 | + this._monthsParse = []; | |
| 672 | + this._longMonthsParse = []; | |
| 673 | + this._shortMonthsParse = []; | |
| 674 | + } | |
| 675 | + | |
| 676 | + for (i = 0; i < 12; i++) { | |
| 677 | + // make the regex if we don't have it already | |
| 678 | + mom = create_utc__createUTC([2000, i]); | |
| 679 | + if (strict && !this._longMonthsParse[i]) { | |
| 680 | + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); | |
| 681 | + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); | |
| 682 | + } | |
| 683 | + if (!strict && !this._monthsParse[i]) { | |
| 684 | + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); | |
| 685 | + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); | |
| 686 | + } | |
| 687 | + // test the regex | |
| 688 | + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { | |
| 689 | + return i; | |
| 690 | + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { | |
| 691 | + return i; | |
| 692 | + } else if (!strict && this._monthsParse[i].test(monthName)) { | |
| 693 | + return i; | |
| 694 | + } | |
| 695 | + } | |
| 696 | + } | |
| 697 | + | |
| 698 | + // MOMENTS | |
| 699 | + | |
| 700 | + function setMonth (mom, value) { | |
| 701 | + var dayOfMonth; | |
| 702 | + | |
| 703 | + if (!mom.isValid()) { | |
| 704 | + // No op | |
| 705 | + return mom; | |
| 706 | + } | |
| 707 | + | |
| 708 | + // TODO: Move this out of here! | |
| 709 | + if (typeof value === 'string') { | |
| 710 | + value = mom.localeData().monthsParse(value); | |
| 711 | + // TODO: Another silent failure? | |
| 712 | + if (typeof value !== 'number') { | |
| 713 | + return mom; | |
| 714 | + } | |
| 715 | + } | |
| 716 | + | |
| 717 | + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); | |
| 718 | + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); | |
| 719 | + return mom; | |
| 720 | + } | |
| 721 | + | |
| 722 | + function getSetMonth (value) { | |
| 723 | + if (value != null) { | |
| 724 | + setMonth(this, value); | |
| 725 | + utils_hooks__hooks.updateOffset(this, true); | |
| 726 | + return this; | |
| 727 | + } else { | |
| 728 | + return get_set__get(this, 'Month'); | |
| 729 | + } | |
| 730 | + } | |
| 731 | + | |
| 732 | + function getDaysInMonth () { | |
| 733 | + return daysInMonth(this.year(), this.month()); | |
| 734 | + } | |
| 735 | + | |
| 736 | + var defaultMonthsShortRegex = matchWord; | |
| 737 | + function monthsShortRegex (isStrict) { | |
| 738 | + if (this._monthsParseExact) { | |
| 739 | + if (!hasOwnProp(this, '_monthsRegex')) { | |
| 740 | + computeMonthsParse.call(this); | |
| 741 | + } | |
| 742 | + if (isStrict) { | |
| 743 | + return this._monthsShortStrictRegex; | |
| 744 | + } else { | |
| 745 | + return this._monthsShortRegex; | |
| 746 | + } | |
| 747 | + } else { | |
| 748 | + return this._monthsShortStrictRegex && isStrict ? | |
| 749 | + this._monthsShortStrictRegex : this._monthsShortRegex; | |
| 750 | + } | |
| 751 | + } | |
| 752 | + | |
| 753 | + var defaultMonthsRegex = matchWord; | |
| 754 | + function monthsRegex (isStrict) { | |
| 755 | + if (this._monthsParseExact) { | |
| 756 | + if (!hasOwnProp(this, '_monthsRegex')) { | |
| 757 | + computeMonthsParse.call(this); | |
| 758 | + } | |
| 759 | + if (isStrict) { | |
| 760 | + return this._monthsStrictRegex; | |
| 761 | + } else { | |
| 762 | + return this._monthsRegex; | |
| 763 | + } | |
| 764 | + } else { | |
| 765 | + return this._monthsStrictRegex && isStrict ? | |
| 766 | + this._monthsStrictRegex : this._monthsRegex; | |
| 767 | + } | |
| 768 | + } | |
| 769 | + | |
| 770 | + function computeMonthsParse () { | |
| 771 | + function cmpLenRev(a, b) { | |
| 772 | + return b.length - a.length; | |
| 773 | + } | |
| 774 | + | |
| 775 | + var shortPieces = [], longPieces = [], mixedPieces = [], | |
| 776 | + i, mom; | |
| 777 | + for (i = 0; i < 12; i++) { | |
| 778 | + // make the regex if we don't have it already | |
| 779 | + mom = create_utc__createUTC([2000, i]); | |
| 780 | + shortPieces.push(this.monthsShort(mom, '')); | |
| 781 | + longPieces.push(this.months(mom, '')); | |
| 782 | + mixedPieces.push(this.months(mom, '')); | |
| 783 | + mixedPieces.push(this.monthsShort(mom, '')); | |
| 784 | + } | |
| 785 | + // Sorting makes sure if one month (or abbr) is a prefix of another it | |
| 786 | + // will match the longer piece. | |
| 787 | + shortPieces.sort(cmpLenRev); | |
| 788 | + longPieces.sort(cmpLenRev); | |
| 789 | + mixedPieces.sort(cmpLenRev); | |
| 790 | + for (i = 0; i < 12; i++) { | |
| 791 | + shortPieces[i] = regexEscape(shortPieces[i]); | |
| 792 | + longPieces[i] = regexEscape(longPieces[i]); | |
| 793 | + mixedPieces[i] = regexEscape(mixedPieces[i]); | |
| 794 | + } | |
| 795 | + | |
| 796 | + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); | |
| 797 | + this._monthsShortRegex = this._monthsRegex; | |
| 798 | + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')$', 'i'); | |
| 799 | + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')$', 'i'); | |
| 800 | + } | |
| 801 | + | |
| 802 | + function checkOverflow (m) { | |
| 803 | + var overflow; | |
| 804 | + var a = m._a; | |
| 805 | + | |
| 806 | + if (a && getParsingFlags(m).overflow === -2) { | |
| 807 | + overflow = | |
| 808 | + a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : | |
| 809 | + a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : | |
| 810 | + a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : | |
| 811 | + a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : | |
| 812 | + a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : | |
| 813 | + a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : | |
| 814 | + -1; | |
| 815 | + | |
| 816 | + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { | |
| 817 | + overflow = DATE; | |
| 818 | + } | |
| 819 | + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { | |
| 820 | + overflow = WEEK; | |
| 821 | + } | |
| 822 | + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { | |
| 823 | + overflow = WEEKDAY; | |
| 824 | + } | |
| 825 | + | |
| 826 | + getParsingFlags(m).overflow = overflow; | |
| 827 | + } | |
| 828 | + | |
| 829 | + return m; | |
| 830 | + } | |
| 831 | + | |
| 832 | + function warn(msg) { | |
| 833 | + if (utils_hooks__hooks.suppressDeprecationWarnings === false && | |
| 834 | + (typeof console !== 'undefined') && console.warn) { | |
| 835 | + console.warn('Deprecation warning: ' + msg); | |
| 836 | + } | |
| 837 | + } | |
| 838 | + | |
| 839 | + function deprecate(msg, fn) { | |
| 840 | + var firstTime = true; | |
| 841 | + | |
| 842 | + return extend(function () { | |
| 843 | + if (firstTime) { | |
| 844 | + warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack); | |
| 845 | + firstTime = false; | |
| 846 | + } | |
| 847 | + return fn.apply(this, arguments); | |
| 848 | + }, fn); | |
| 849 | + } | |
| 850 | + | |
| 851 | + var deprecations = {}; | |
| 852 | + | |
| 853 | + function deprecateSimple(name, msg) { | |
| 854 | + if (!deprecations[name]) { | |
| 855 | + warn(msg); | |
| 856 | + deprecations[name] = true; | |
| 857 | + } | |
| 858 | + } | |
| 859 | + | |
| 860 | + utils_hooks__hooks.suppressDeprecationWarnings = false; | |
| 861 | + | |
| 862 | + // iso 8601 regex | |
| 863 | + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) | |
| 864 | + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; | |
| 865 | + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; | |
| 866 | + | |
| 867 | + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; | |
| 868 | + | |
| 869 | + var isoDates = [ | |
| 870 | + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], | |
| 871 | + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], | |
| 872 | + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], | |
| 873 | + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], | |
| 874 | + ['YYYY-DDD', /\d{4}-\d{3}/], | |
| 875 | + ['YYYY-MM', /\d{4}-\d\d/, false], | |
| 876 | + ['YYYYYYMMDD', /[+-]\d{10}/], | |
| 877 | + ['YYYYMMDD', /\d{8}/], | |
| 878 | + // YYYYMM is NOT allowed by the standard | |
| 879 | + ['GGGG[W]WWE', /\d{4}W\d{3}/], | |
| 880 | + ['GGGG[W]WW', /\d{4}W\d{2}/, false], | |
| 881 | + ['YYYYDDD', /\d{7}/] | |
| 882 | + ]; | |
| 883 | + | |
| 884 | + // iso time formats and regexes | |
| 885 | + var isoTimes = [ | |
| 886 | + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], | |
| 887 | + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], | |
| 888 | + ['HH:mm:ss', /\d\d:\d\d:\d\d/], | |
| 889 | + ['HH:mm', /\d\d:\d\d/], | |
| 890 | + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], | |
| 891 | + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], | |
| 892 | + ['HHmmss', /\d\d\d\d\d\d/], | |
| 893 | + ['HHmm', /\d\d\d\d/], | |
| 894 | + ['HH', /\d\d/] | |
| 895 | + ]; | |
| 896 | + | |
| 897 | + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; | |
| 898 | + | |
| 899 | + // date from iso format | |
| 900 | + function configFromISO(config) { | |
| 901 | + var i, l, | |
| 902 | + string = config._i, | |
| 903 | + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), | |
| 904 | + allowTime, dateFormat, timeFormat, tzFormat; | |
| 905 | + | |
| 906 | + if (match) { | |
| 907 | + getParsingFlags(config).iso = true; | |
| 908 | + | |
| 909 | + for (i = 0, l = isoDates.length; i < l; i++) { | |
| 910 | + if (isoDates[i][1].exec(match[1])) { | |
| 911 | + dateFormat = isoDates[i][0]; | |
| 912 | + allowTime = isoDates[i][2] !== false; | |
| 913 | + break; | |
| 914 | + } | |
| 915 | + } | |
| 916 | + if (dateFormat == null) { | |
| 917 | + config._isValid = false; | |
| 918 | + return; | |
| 919 | + } | |
| 920 | + if (match[3]) { | |
| 921 | + for (i = 0, l = isoTimes.length; i < l; i++) { | |
| 922 | + if (isoTimes[i][1].exec(match[3])) { | |
| 923 | + // match[2] should be 'T' or space | |
| 924 | + timeFormat = (match[2] || ' ') + isoTimes[i][0]; | |
| 925 | + break; | |
| 926 | + } | |
| 927 | + } | |
| 928 | + if (timeFormat == null) { | |
| 929 | + config._isValid = false; | |
| 930 | + return; | |
| 931 | + } | |
| 932 | + } | |
| 933 | + if (!allowTime && timeFormat != null) { | |
| 934 | + config._isValid = false; | |
| 935 | + return; | |
| 936 | + } | |
| 937 | + if (match[4]) { | |
| 938 | + if (tzRegex.exec(match[4])) { | |
| 939 | + tzFormat = 'Z'; | |
| 940 | + } else { | |
| 941 | + config._isValid = false; | |
| 942 | + return; | |
| 943 | + } | |
| 944 | + } | |
| 945 | + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); | |
| 946 | + configFromStringAndFormat(config); | |
| 947 | + } else { | |
| 948 | + config._isValid = false; | |
| 949 | + } | |
| 950 | + } | |
| 951 | + | |
| 952 | + // date from iso format or fallback | |
| 953 | + function configFromString(config) { | |
| 954 | + var matched = aspNetJsonRegex.exec(config._i); | |
| 955 | + | |
| 956 | + if (matched !== null) { | |
| 957 | + config._d = new Date(+matched[1]); | |
| 958 | + return; | |
| 959 | + } | |
| 960 | + | |
| 961 | + configFromISO(config); | |
| 962 | + if (config._isValid === false) { | |
| 963 | + delete config._isValid; | |
| 964 | + utils_hooks__hooks.createFromInputFallback(config); | |
| 965 | + } | |
| 966 | + } | |
| 967 | + | |
| 968 | + utils_hooks__hooks.createFromInputFallback = deprecate( | |
| 969 | + 'moment construction falls back to js Date. This is ' + | |
| 970 | + 'discouraged and will be removed in upcoming major ' + | |
| 971 | + 'release. Please refer to ' + | |
| 972 | + 'https://github.com/moment/moment/issues/1407 for more info.', | |
| 973 | + function (config) { | |
| 974 | + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); | |
| 975 | + } | |
| 976 | + ); | |
| 977 | + | |
| 978 | + function createDate (y, m, d, h, M, s, ms) { | |
| 979 | + //can't just apply() to create a date: | |
| 980 | + //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply | |
| 981 | + var date = new Date(y, m, d, h, M, s, ms); | |
| 982 | + | |
| 983 | + //the date constructor remaps years 0-99 to 1900-1999 | |
| 984 | + if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { | |
| 985 | + date.setFullYear(y); | |
| 986 | + } | |
| 987 | + return date; | |
| 988 | + } | |
| 989 | + | |
| 990 | + function createUTCDate (y) { | |
| 991 | + var date = new Date(Date.UTC.apply(null, arguments)); | |
| 992 | + | |
| 993 | + //the Date.UTC function remaps years 0-99 to 1900-1999 | |
| 994 | + if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { | |
| 995 | + date.setUTCFullYear(y); | |
| 996 | + } | |
| 997 | + return date; | |
| 998 | + } | |
| 999 | + | |
| 1000 | + // FORMATTING | |
| 1001 | + | |
| 1002 | + addFormatToken('Y', 0, 0, function () { | |
| 1003 | + var y = this.year(); | |
| 1004 | + return y <= 9999 ? '' + y : '+' + y; | |
| 1005 | + }); | |
| 1006 | + | |
| 1007 | + addFormatToken(0, ['YY', 2], 0, function () { | |
| 1008 | + return this.year() % 100; | |
| 1009 | + }); | |
| 1010 | + | |
| 1011 | + addFormatToken(0, ['YYYY', 4], 0, 'year'); | |
| 1012 | + addFormatToken(0, ['YYYYY', 5], 0, 'year'); | |
| 1013 | + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); | |
| 1014 | + | |
| 1015 | + // ALIASES | |
| 1016 | + | |
| 1017 | + addUnitAlias('year', 'y'); | |
| 1018 | + | |
| 1019 | + // PARSING | |
| 1020 | + | |
| 1021 | + addRegexToken('Y', matchSigned); | |
| 1022 | + addRegexToken('YY', match1to2, match2); | |
| 1023 | + addRegexToken('YYYY', match1to4, match4); | |
| 1024 | + addRegexToken('YYYYY', match1to6, match6); | |
| 1025 | + addRegexToken('YYYYYY', match1to6, match6); | |
| 1026 | + | |
| 1027 | + addParseToken(['YYYYY', 'YYYYYY'], YEAR); | |
| 1028 | + addParseToken('YYYY', function (input, array) { | |
| 1029 | + array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input); | |
| 1030 | + }); | |
| 1031 | + addParseToken('YY', function (input, array) { | |
| 1032 | + array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input); | |
| 1033 | + }); | |
| 1034 | + addParseToken('Y', function (input, array) { | |
| 1035 | + array[YEAR] = parseInt(input, 10); | |
| 1036 | + }); | |
| 1037 | + | |
| 1038 | + // HELPERS | |
| 1039 | + | |
| 1040 | + function daysInYear(year) { | |
| 1041 | + return isLeapYear(year) ? 366 : 365; | |
| 1042 | + } | |
| 1043 | + | |
| 1044 | + function isLeapYear(year) { | |
| 1045 | + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; | |
| 1046 | + } | |
| 1047 | + | |
| 1048 | + // HOOKS | |
| 1049 | + | |
| 1050 | + utils_hooks__hooks.parseTwoDigitYear = function (input) { | |
| 1051 | + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); | |
| 1052 | + }; | |
| 1053 | + | |
| 1054 | + // MOMENTS | |
| 1055 | + | |
| 1056 | + var getSetYear = makeGetSet('FullYear', false); | |
| 1057 | + | |
| 1058 | + function getIsLeapYear () { | |
| 1059 | + return isLeapYear(this.year()); | |
| 1060 | + } | |
| 1061 | + | |
| 1062 | + // start-of-first-week - start-of-year | |
| 1063 | + function firstWeekOffset(year, dow, doy) { | |
| 1064 | + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) | |
| 1065 | + fwd = 7 + dow - doy, | |
| 1066 | + // first-week day local weekday -- which local weekday is fwd | |
| 1067 | + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; | |
| 1068 | + | |
| 1069 | + return -fwdlw + fwd - 1; | |
| 1070 | + } | |
| 1071 | + | |
| 1072 | + //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday | |
| 1073 | + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { | |
| 1074 | + var localWeekday = (7 + weekday - dow) % 7, | |
| 1075 | + weekOffset = firstWeekOffset(year, dow, doy), | |
| 1076 | + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, | |
| 1077 | + resYear, resDayOfYear; | |
| 1078 | + | |
| 1079 | + if (dayOfYear <= 0) { | |
| 1080 | + resYear = year - 1; | |
| 1081 | + resDayOfYear = daysInYear(resYear) + dayOfYear; | |
| 1082 | + } else if (dayOfYear > daysInYear(year)) { | |
| 1083 | + resYear = year + 1; | |
| 1084 | + resDayOfYear = dayOfYear - daysInYear(year); | |
| 1085 | + } else { | |
| 1086 | + resYear = year; | |
| 1087 | + resDayOfYear = dayOfYear; | |
| 1088 | + } | |
| 1089 | + | |
| 1090 | + return { | |
| 1091 | + year: resYear, | |
| 1092 | + dayOfYear: resDayOfYear | |
| 1093 | + }; | |
| 1094 | + } | |
| 1095 | + | |
| 1096 | + function weekOfYear(mom, dow, doy) { | |
| 1097 | + var weekOffset = firstWeekOffset(mom.year(), dow, doy), | |
| 1098 | + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, | |
| 1099 | + resWeek, resYear; | |
| 1100 | + | |
| 1101 | + if (week < 1) { | |
| 1102 | + resYear = mom.year() - 1; | |
| 1103 | + resWeek = week + weeksInYear(resYear, dow, doy); | |
| 1104 | + } else if (week > weeksInYear(mom.year(), dow, doy)) { | |
| 1105 | + resWeek = week - weeksInYear(mom.year(), dow, doy); | |
| 1106 | + resYear = mom.year() + 1; | |
| 1107 | + } else { | |
| 1108 | + resYear = mom.year(); | |
| 1109 | + resWeek = week; | |
| 1110 | + } | |
| 1111 | + | |
| 1112 | + return { | |
| 1113 | + week: resWeek, | |
| 1114 | + year: resYear | |
| 1115 | + }; | |
| 1116 | + } | |
| 1117 | + | |
| 1118 | + function weeksInYear(year, dow, doy) { | |
| 1119 | + var weekOffset = firstWeekOffset(year, dow, doy), | |
| 1120 | + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); | |
| 1121 | + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; | |
| 1122 | + } | |
| 1123 | + | |
| 1124 | + // Pick the first defined of two or three arguments. | |
| 1125 | + function defaults(a, b, c) { | |
| 1126 | + if (a != null) { | |
| 1127 | + return a; | |
| 1128 | + } | |
| 1129 | + if (b != null) { | |
| 1130 | + return b; | |
| 1131 | + } | |
| 1132 | + return c; | |
| 1133 | + } | |
| 1134 | + | |
| 1135 | + function currentDateArray(config) { | |
| 1136 | + // hooks is actually the exported moment object | |
| 1137 | + var nowValue = new Date(utils_hooks__hooks.now()); | |
| 1138 | + if (config._useUTC) { | |
| 1139 | + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; | |
| 1140 | + } | |
| 1141 | + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; | |
| 1142 | + } | |
| 1143 | + | |
| 1144 | + // convert an array to a date. | |
| 1145 | + // the array should mirror the parameters below | |
| 1146 | + // note: all values past the year are optional and will default to the lowest possible value. | |
| 1147 | + // [year, month, day , hour, minute, second, millisecond] | |
| 1148 | + function configFromArray (config) { | |
| 1149 | + var i, date, input = [], currentDate, yearToUse; | |
| 1150 | + | |
| 1151 | + if (config._d) { | |
| 1152 | + return; | |
| 1153 | + } | |
| 1154 | + | |
| 1155 | + currentDate = currentDateArray(config); | |
| 1156 | + | |
| 1157 | + //compute day of the year from weeks and weekdays | |
| 1158 | + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { | |
| 1159 | + dayOfYearFromWeekInfo(config); | |
| 1160 | + } | |
| 1161 | + | |
| 1162 | + //if the day of the year is set, figure out what it is | |
| 1163 | + if (config._dayOfYear) { | |
| 1164 | + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); | |
| 1165 | + | |
| 1166 | + if (config._dayOfYear > daysInYear(yearToUse)) { | |
| 1167 | + getParsingFlags(config)._overflowDayOfYear = true; | |
| 1168 | + } | |
| 1169 | + | |
| 1170 | + date = createUTCDate(yearToUse, 0, config._dayOfYear); | |
| 1171 | + config._a[MONTH] = date.getUTCMonth(); | |
| 1172 | + config._a[DATE] = date.getUTCDate(); | |
| 1173 | + } | |
| 1174 | + | |
| 1175 | + // Default to current date. | |
| 1176 | + // * if no year, month, day of month are given, default to today | |
| 1177 | + // * if day of month is given, default month and year | |
| 1178 | + // * if month is given, default only year | |
| 1179 | + // * if year is given, don't default anything | |
| 1180 | + for (i = 0; i < 3 && config._a[i] == null; ++i) { | |
| 1181 | + config._a[i] = input[i] = currentDate[i]; | |
| 1182 | + } | |
| 1183 | + | |
| 1184 | + // Zero out whatever was not defaulted, including time | |
| 1185 | + for (; i < 7; i++) { | |
| 1186 | + config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; | |
| 1187 | + } | |
| 1188 | + | |
| 1189 | + // Check for 24:00:00.000 | |
| 1190 | + if (config._a[HOUR] === 24 && | |
| 1191 | + config._a[MINUTE] === 0 && | |
| 1192 | + config._a[SECOND] === 0 && | |
| 1193 | + config._a[MILLISECOND] === 0) { | |
| 1194 | + config._nextDay = true; | |
| 1195 | + config._a[HOUR] = 0; | |
| 1196 | + } | |
| 1197 | + | |
| 1198 | + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); | |
| 1199 | + // Apply timezone offset from input. The actual utcOffset can be changed | |
| 1200 | + // with parseZone. | |
| 1201 | + if (config._tzm != null) { | |
| 1202 | + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); | |
| 1203 | + } | |
| 1204 | + | |
| 1205 | + if (config._nextDay) { | |
| 1206 | + config._a[HOUR] = 24; | |
| 1207 | + } | |
| 1208 | + } | |
| 1209 | + | |
| 1210 | + function dayOfYearFromWeekInfo(config) { | |
| 1211 | + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; | |
| 1212 | + | |
| 1213 | + w = config._w; | |
| 1214 | + if (w.GG != null || w.W != null || w.E != null) { | |
| 1215 | + dow = 1; | |
| 1216 | + doy = 4; | |
| 1217 | + | |
| 1218 | + // TODO: We need to take the current isoWeekYear, but that depends on | |
| 1219 | + // how we interpret now (local, utc, fixed offset). So create | |
| 1220 | + // a now version of current config (take local/utc/offset flags, and | |
| 1221 | + // create now). | |
| 1222 | + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year); | |
| 1223 | + week = defaults(w.W, 1); | |
| 1224 | + weekday = defaults(w.E, 1); | |
| 1225 | + if (weekday < 1 || weekday > 7) { | |
| 1226 | + weekdayOverflow = true; | |
| 1227 | + } | |
| 1228 | + } else { | |
| 1229 | + dow = config._locale._week.dow; | |
| 1230 | + doy = config._locale._week.doy; | |
| 1231 | + | |
| 1232 | + weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year); | |
| 1233 | + week = defaults(w.w, 1); | |
| 1234 | + | |
| 1235 | + if (w.d != null) { | |
| 1236 | + // weekday -- low day numbers are considered next week | |
| 1237 | + weekday = w.d; | |
| 1238 | + if (weekday < 0 || weekday > 6) { | |
| 1239 | + weekdayOverflow = true; | |
| 1240 | + } | |
| 1241 | + } else if (w.e != null) { | |
| 1242 | + // local weekday -- counting starts from begining of week | |
| 1243 | + weekday = w.e + dow; | |
| 1244 | + if (w.e < 0 || w.e > 6) { | |
| 1245 | + weekdayOverflow = true; | |
| 1246 | + } | |
| 1247 | + } else { | |
| 1248 | + // default to begining of week | |
| 1249 | + weekday = dow; | |
| 1250 | + } | |
| 1251 | + } | |
| 1252 | + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { | |
| 1253 | + getParsingFlags(config)._overflowWeeks = true; | |
| 1254 | + } else if (weekdayOverflow != null) { | |
| 1255 | + getParsingFlags(config)._overflowWeekday = true; | |
| 1256 | + } else { | |
| 1257 | + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); | |
| 1258 | + config._a[YEAR] = temp.year; | |
| 1259 | + config._dayOfYear = temp.dayOfYear; | |
| 1260 | + } | |
| 1261 | + } | |
| 1262 | + | |
| 1263 | + // constant that refers to the ISO standard | |
| 1264 | + utils_hooks__hooks.ISO_8601 = function () {}; | |
| 1265 | + | |
| 1266 | + // date from string and format string | |
| 1267 | + function configFromStringAndFormat(config) { | |
| 1268 | + // TODO: Move this to another part of the creation flow to prevent circular deps | |
| 1269 | + if (config._f === utils_hooks__hooks.ISO_8601) { | |
| 1270 | + configFromISO(config); | |
| 1271 | + return; | |
| 1272 | + } | |
| 1273 | + | |
| 1274 | + config._a = []; | |
| 1275 | + getParsingFlags(config).empty = true; | |
| 1276 | + | |
| 1277 | + // This array is used to make a Date, either with `new Date` or `Date.UTC` | |
| 1278 | + var string = '' + config._i, | |
| 1279 | + i, parsedInput, tokens, token, skipped, | |
| 1280 | + stringLength = string.length, | |
| 1281 | + totalParsedInputLength = 0; | |
| 1282 | + | |
| 1283 | + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; | |
| 1284 | + | |
| 1285 | + for (i = 0; i < tokens.length; i++) { | |
| 1286 | + token = tokens[i]; | |
| 1287 | + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; | |
| 1288 | + // console.log('token', token, 'parsedInput', parsedInput, | |
| 1289 | + // 'regex', getParseRegexForToken(token, config)); | |
| 1290 | + if (parsedInput) { | |
| 1291 | + skipped = string.substr(0, string.indexOf(parsedInput)); | |
| 1292 | + if (skipped.length > 0) { | |
| 1293 | + getParsingFlags(config).unusedInput.push(skipped); | |
| 1294 | + } | |
| 1295 | + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); | |
| 1296 | + totalParsedInputLength += parsedInput.length; | |
| 1297 | + } | |
| 1298 | + // don't parse if it's not a known token | |
| 1299 | + if (formatTokenFunctions[token]) { | |
| 1300 | + if (parsedInput) { | |
| 1301 | + getParsingFlags(config).empty = false; | |
| 1302 | + } | |
| 1303 | + else { | |
| 1304 | + getParsingFlags(config).unusedTokens.push(token); | |
| 1305 | + } | |
| 1306 | + addTimeToArrayFromToken(token, parsedInput, config); | |
| 1307 | + } | |
| 1308 | + else if (config._strict && !parsedInput) { | |
| 1309 | + getParsingFlags(config).unusedTokens.push(token); | |
| 1310 | + } | |
| 1311 | + } | |
| 1312 | + | |
| 1313 | + // add remaining unparsed input length to the string | |
| 1314 | + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; | |
| 1315 | + if (string.length > 0) { | |
| 1316 | + getParsingFlags(config).unusedInput.push(string); | |
| 1317 | + } | |
| 1318 | + | |
| 1319 | + // clear _12h flag if hour is <= 12 | |
| 1320 | + if (getParsingFlags(config).bigHour === true && | |
| 1321 | + config._a[HOUR] <= 12 && | |
| 1322 | + config._a[HOUR] > 0) { | |
| 1323 | + getParsingFlags(config).bigHour = undefined; | |
| 1324 | + } | |
| 1325 | + // handle meridiem | |
| 1326 | + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); | |
| 1327 | + | |
| 1328 | + configFromArray(config); | |
| 1329 | + checkOverflow(config); | |
| 1330 | + } | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + function meridiemFixWrap (locale, hour, meridiem) { | |
| 1334 | + var isPm; | |
| 1335 | + | |
| 1336 | + if (meridiem == null) { | |
| 1337 | + // nothing to do | |
| 1338 | + return hour; | |
| 1339 | + } | |
| 1340 | + if (locale.meridiemHour != null) { | |
| 1341 | + return locale.meridiemHour(hour, meridiem); | |
| 1342 | + } else if (locale.isPM != null) { | |
| 1343 | + // Fallback | |
| 1344 | + isPm = locale.isPM(meridiem); | |
| 1345 | + if (isPm && hour < 12) { | |
| 1346 | + hour += 12; | |
| 1347 | + } | |
| 1348 | + if (!isPm && hour === 12) { | |
| 1349 | + hour = 0; | |
| 1350 | + } | |
| 1351 | + return hour; | |
| 1352 | + } else { | |
| 1353 | + // this is not supposed to happen | |
| 1354 | + return hour; | |
| 1355 | + } | |
| 1356 | + } | |
| 1357 | + | |
| 1358 | + // date from string and array of format strings | |
| 1359 | + function configFromStringAndArray(config) { | |
| 1360 | + var tempConfig, | |
| 1361 | + bestMoment, | |
| 1362 | + | |
| 1363 | + scoreToBeat, | |
| 1364 | + i, | |
| 1365 | + currentScore; | |
| 1366 | + | |
| 1367 | + if (config._f.length === 0) { | |
| 1368 | + getParsingFlags(config).invalidFormat = true; | |
| 1369 | + config._d = new Date(NaN); | |
| 1370 | + return; | |
| 1371 | + } | |
| 1372 | + | |
| 1373 | + for (i = 0; i < config._f.length; i++) { | |
| 1374 | + currentScore = 0; | |
| 1375 | + tempConfig = copyConfig({}, config); | |
| 1376 | + if (config._useUTC != null) { | |
| 1377 | + tempConfig._useUTC = config._useUTC; | |
| 1378 | + } | |
| 1379 | + tempConfig._f = config._f[i]; | |
| 1380 | + configFromStringAndFormat(tempConfig); | |
| 1381 | + | |
| 1382 | + if (!valid__isValid(tempConfig)) { | |
| 1383 | + continue; | |
| 1384 | + } | |
| 1385 | + | |
| 1386 | + // if there is any input that was not parsed add a penalty for that format | |
| 1387 | + currentScore += getParsingFlags(tempConfig).charsLeftOver; | |
| 1388 | + | |
| 1389 | + //or tokens | |
| 1390 | + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; | |
| 1391 | + | |
| 1392 | + getParsingFlags(tempConfig).score = currentScore; | |
| 1393 | + | |
| 1394 | + if (scoreToBeat == null || currentScore < scoreToBeat) { | |
| 1395 | + scoreToBeat = currentScore; | |
| 1396 | + bestMoment = tempConfig; | |
| 1397 | + } | |
| 1398 | + } | |
| 1399 | + | |
| 1400 | + extend(config, bestMoment || tempConfig); | |
| 1401 | + } | |
| 1402 | + | |
| 1403 | + function configFromObject(config) { | |
| 1404 | + if (config._d) { | |
| 1405 | + return; | |
| 1406 | + } | |
| 1407 | + | |
| 1408 | + var i = normalizeObjectUnits(config._i); | |
| 1409 | + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { | |
| 1410 | + return obj && parseInt(obj, 10); | |
| 1411 | + }); | |
| 1412 | + | |
| 1413 | + configFromArray(config); | |
| 1414 | + } | |
| 1415 | + | |
| 1416 | + function createFromConfig (config) { | |
| 1417 | + var res = new Moment(checkOverflow(prepareConfig(config))); | |
| 1418 | + if (res._nextDay) { | |
| 1419 | + // Adding is smart enough around DST | |
| 1420 | + res.add(1, 'd'); | |
| 1421 | + res._nextDay = undefined; | |
| 1422 | + } | |
| 1423 | + | |
| 1424 | + return res; | |
| 1425 | + } | |
| 1426 | + | |
| 1427 | + function prepareConfig (config) { | |
| 1428 | + var input = config._i, | |
| 1429 | + format = config._f; | |
| 1430 | + | |
| 1431 | + config._locale = config._locale || locale_locales__getLocale(config._l); | |
| 1432 | + | |
| 1433 | + if (input === null || (format === undefined && input === '')) { | |
| 1434 | + return valid__createInvalid({nullInput: true}); | |
| 1435 | + } | |
| 1436 | + | |
| 1437 | + if (typeof input === 'string') { | |
| 1438 | + config._i = input = config._locale.preparse(input); | |
| 1439 | + } | |
| 1440 | + | |
| 1441 | + if (isMoment(input)) { | |
| 1442 | + return new Moment(checkOverflow(input)); | |
| 1443 | + } else if (isArray(format)) { | |
| 1444 | + configFromStringAndArray(config); | |
| 1445 | + } else if (format) { | |
| 1446 | + configFromStringAndFormat(config); | |
| 1447 | + } else if (isDate(input)) { | |
| 1448 | + config._d = input; | |
| 1449 | + } else { | |
| 1450 | + configFromInput(config); | |
| 1451 | + } | |
| 1452 | + | |
| 1453 | + if (!valid__isValid(config)) { | |
| 1454 | + config._d = null; | |
| 1455 | + } | |
| 1456 | + | |
| 1457 | + return config; | |
| 1458 | + } | |
| 1459 | + | |
| 1460 | + function configFromInput(config) { | |
| 1461 | + var input = config._i; | |
| 1462 | + if (input === undefined) { | |
| 1463 | + config._d = new Date(utils_hooks__hooks.now()); | |
| 1464 | + } else if (isDate(input)) { | |
| 1465 | + config._d = new Date(+input); | |
| 1466 | + } else if (typeof input === 'string') { | |
| 1467 | + configFromString(config); | |
| 1468 | + } else if (isArray(input)) { | |
| 1469 | + config._a = map(input.slice(0), function (obj) { | |
| 1470 | + return parseInt(obj, 10); | |
| 1471 | + }); | |
| 1472 | + configFromArray(config); | |
| 1473 | + } else if (typeof(input) === 'object') { | |
| 1474 | + configFromObject(config); | |
| 1475 | + } else if (typeof(input) === 'number') { | |
| 1476 | + // from milliseconds | |
| 1477 | + config._d = new Date(input); | |
| 1478 | + } else { | |
| 1479 | + utils_hooks__hooks.createFromInputFallback(config); | |
| 1480 | + } | |
| 1481 | + } | |
| 1482 | + | |
| 1483 | + function createLocalOrUTC (input, format, locale, strict, isUTC) { | |
| 1484 | + var c = {}; | |
| 1485 | + | |
| 1486 | + if (typeof(locale) === 'boolean') { | |
| 1487 | + strict = locale; | |
| 1488 | + locale = undefined; | |
| 1489 | + } | |
| 1490 | + // object construction must be done this way. | |
| 1491 | + // https://github.com/moment/moment/issues/1423 | |
| 1492 | + c._isAMomentObject = true; | |
| 1493 | + c._useUTC = c._isUTC = isUTC; | |
| 1494 | + c._l = locale; | |
| 1495 | + c._i = input; | |
| 1496 | + c._f = format; | |
| 1497 | + c._strict = strict; | |
| 1498 | + | |
| 1499 | + return createFromConfig(c); | |
| 1500 | + } | |
| 1501 | + | |
| 1502 | + function local__createLocal (input, format, locale, strict) { | |
| 1503 | + return createLocalOrUTC(input, format, locale, strict, false); | |
| 1504 | + } | |
| 1505 | + | |
| 1506 | + var prototypeMin = deprecate( | |
| 1507 | + 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', | |
| 1508 | + function () { | |
| 1509 | + var other = local__createLocal.apply(null, arguments); | |
| 1510 | + if (this.isValid() && other.isValid()) { | |
| 1511 | + return other < this ? this : other; | |
| 1512 | + } else { | |
| 1513 | + return valid__createInvalid(); | |
| 1514 | + } | |
| 1515 | + } | |
| 1516 | + ); | |
| 1517 | + | |
| 1518 | + var prototypeMax = deprecate( | |
| 1519 | + 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', | |
| 1520 | + function () { | |
| 1521 | + var other = local__createLocal.apply(null, arguments); | |
| 1522 | + if (this.isValid() && other.isValid()) { | |
| 1523 | + return other > this ? this : other; | |
| 1524 | + } else { | |
| 1525 | + return valid__createInvalid(); | |
| 1526 | + } | |
| 1527 | + } | |
| 1528 | + ); | |
| 1529 | + | |
| 1530 | + // Pick a moment m from moments so that m[fn](other) is true for all | |
| 1531 | + // other. This relies on the function fn to be transitive. | |
| 1532 | + // | |
| 1533 | + // moments should either be an array of moment objects or an array, whose | |
| 1534 | + // first element is an array of moment objects. | |
| 1535 | + function pickBy(fn, moments) { | |
| 1536 | + var res, i; | |
| 1537 | + if (moments.length === 1 && isArray(moments[0])) { | |
| 1538 | + moments = moments[0]; | |
| 1539 | + } | |
| 1540 | + if (!moments.length) { | |
| 1541 | + return local__createLocal(); | |
| 1542 | + } | |
| 1543 | + res = moments[0]; | |
| 1544 | + for (i = 1; i < moments.length; ++i) { | |
| 1545 | + if (!moments[i].isValid() || moments[i][fn](res)) { | |
| 1546 | + res = moments[i]; | |
| 1547 | + } | |
| 1548 | + } | |
| 1549 | + return res; | |
| 1550 | + } | |
| 1551 | + | |
| 1552 | + // TODO: Use [].sort instead? | |
| 1553 | + function min () { | |
| 1554 | + var args = [].slice.call(arguments, 0); | |
| 1555 | + | |
| 1556 | + return pickBy('isBefore', args); | |
| 1557 | + } | |
| 1558 | + | |
| 1559 | + function max () { | |
| 1560 | + var args = [].slice.call(arguments, 0); | |
| 1561 | + | |
| 1562 | + return pickBy('isAfter', args); | |
| 1563 | + } | |
| 1564 | + | |
| 1565 | + var now = function () { | |
| 1566 | + return Date.now ? Date.now() : +(new Date()); | |
| 1567 | + }; | |
| 1568 | + | |
| 1569 | + function Duration (duration) { | |
| 1570 | + var normalizedInput = normalizeObjectUnits(duration), | |
| 1571 | + years = normalizedInput.year || 0, | |
| 1572 | + quarters = normalizedInput.quarter || 0, | |
| 1573 | + months = normalizedInput.month || 0, | |
| 1574 | + weeks = normalizedInput.week || 0, | |
| 1575 | + days = normalizedInput.day || 0, | |
| 1576 | + hours = normalizedInput.hour || 0, | |
| 1577 | + minutes = normalizedInput.minute || 0, | |
| 1578 | + seconds = normalizedInput.second || 0, | |
| 1579 | + milliseconds = normalizedInput.millisecond || 0; | |
| 1580 | + | |
| 1581 | + // representation for dateAddRemove | |
| 1582 | + this._milliseconds = +milliseconds + | |
| 1583 | + seconds * 1e3 + // 1000 | |
| 1584 | + minutes * 6e4 + // 1000 * 60 | |
| 1585 | + hours * 36e5; // 1000 * 60 * 60 | |
| 1586 | + // Because of dateAddRemove treats 24 hours as different from a | |
| 1587 | + // day when working around DST, we need to store them separately | |
| 1588 | + this._days = +days + | |
| 1589 | + weeks * 7; | |
| 1590 | + // It is impossible translate months into days without knowing | |
| 1591 | + // which months you are are talking about, so we have to store | |
| 1592 | + // it separately. | |
| 1593 | + this._months = +months + | |
| 1594 | + quarters * 3 + | |
| 1595 | + years * 12; | |
| 1596 | + | |
| 1597 | + this._data = {}; | |
| 1598 | + | |
| 1599 | + this._locale = locale_locales__getLocale(); | |
| 1600 | + | |
| 1601 | + this._bubble(); | |
| 1602 | + } | |
| 1603 | + | |
| 1604 | + function isDuration (obj) { | |
| 1605 | + return obj instanceof Duration; | |
| 1606 | + } | |
| 1607 | + | |
| 1608 | + // FORMATTING | |
| 1609 | + | |
| 1610 | + function offset (token, separator) { | |
| 1611 | + addFormatToken(token, 0, 0, function () { | |
| 1612 | + var offset = this.utcOffset(); | |
| 1613 | + var sign = '+'; | |
| 1614 | + if (offset < 0) { | |
| 1615 | + offset = -offset; | |
| 1616 | + sign = '-'; | |
| 1617 | + } | |
| 1618 | + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); | |
| 1619 | + }); | |
| 1620 | + } | |
| 1621 | + | |
| 1622 | + offset('Z', ':'); | |
| 1623 | + offset('ZZ', ''); | |
| 1624 | + | |
| 1625 | + // PARSING | |
| 1626 | + | |
| 1627 | + addRegexToken('Z', matchShortOffset); | |
| 1628 | + addRegexToken('ZZ', matchShortOffset); | |
| 1629 | + addParseToken(['Z', 'ZZ'], function (input, array, config) { | |
| 1630 | + config._useUTC = true; | |
| 1631 | + config._tzm = offsetFromString(matchShortOffset, input); | |
| 1632 | + }); | |
| 1633 | + | |
| 1634 | + // HELPERS | |
| 1635 | + | |
| 1636 | + // timezone chunker | |
| 1637 | + // '+10:00' > ['10', '00'] | |
| 1638 | + // '-1530' > ['-15', '30'] | |
| 1639 | + var chunkOffset = /([\+\-]|\d\d)/gi; | |
| 1640 | + | |
| 1641 | + function offsetFromString(matcher, string) { | |
| 1642 | + var matches = ((string || '').match(matcher) || []); | |
| 1643 | + var chunk = matches[matches.length - 1] || []; | |
| 1644 | + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; | |
| 1645 | + var minutes = +(parts[1] * 60) + toInt(parts[2]); | |
| 1646 | + | |
| 1647 | + return parts[0] === '+' ? minutes : -minutes; | |
| 1648 | + } | |
| 1649 | + | |
| 1650 | + // Return a moment from input, that is local/utc/zone equivalent to model. | |
| 1651 | + function cloneWithOffset(input, model) { | |
| 1652 | + var res, diff; | |
| 1653 | + if (model._isUTC) { | |
| 1654 | + res = model.clone(); | |
| 1655 | + diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res); | |
| 1656 | + // Use low-level api, because this fn is low-level api. | |
| 1657 | + res._d.setTime(+res._d + diff); | |
| 1658 | + utils_hooks__hooks.updateOffset(res, false); | |
| 1659 | + return res; | |
| 1660 | + } else { | |
| 1661 | + return local__createLocal(input).local(); | |
| 1662 | + } | |
| 1663 | + } | |
| 1664 | + | |
| 1665 | + function getDateOffset (m) { | |
| 1666 | + // On Firefox.24 Date#getTimezoneOffset returns a floating point. | |
| 1667 | + // https://github.com/moment/moment/pull/1871 | |
| 1668 | + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; | |
| 1669 | + } | |
| 1670 | + | |
| 1671 | + // HOOKS | |
| 1672 | + | |
| 1673 | + // This function will be called whenever a moment is mutated. | |
| 1674 | + // It is intended to keep the offset in sync with the timezone. | |
| 1675 | + utils_hooks__hooks.updateOffset = function () {}; | |
| 1676 | + | |
| 1677 | + // MOMENTS | |
| 1678 | + | |
| 1679 | + // keepLocalTime = true means only change the timezone, without | |
| 1680 | + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> | |
| 1681 | + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset | |
| 1682 | + // +0200, so we adjust the time as needed, to be valid. | |
| 1683 | + // | |
| 1684 | + // Keeping the time actually adds/subtracts (one hour) | |
| 1685 | + // from the actual represented time. That is why we call updateOffset | |
| 1686 | + // a second time. In case it wants us to change the offset again | |
| 1687 | + // _changeInProgress == true case, then we have to adjust, because | |
| 1688 | + // there is no such time in the given timezone. | |
| 1689 | + function getSetOffset (input, keepLocalTime) { | |
| 1690 | + var offset = this._offset || 0, | |
| 1691 | + localAdjust; | |
| 1692 | + if (!this.isValid()) { | |
| 1693 | + return input != null ? this : NaN; | |
| 1694 | + } | |
| 1695 | + if (input != null) { | |
| 1696 | + if (typeof input === 'string') { | |
| 1697 | + input = offsetFromString(matchShortOffset, input); | |
| 1698 | + } else if (Math.abs(input) < 16) { | |
| 1699 | + input = input * 60; | |
| 1700 | + } | |
| 1701 | + if (!this._isUTC && keepLocalTime) { | |
| 1702 | + localAdjust = getDateOffset(this); | |
| 1703 | + } | |
| 1704 | + this._offset = input; | |
| 1705 | + this._isUTC = true; | |
| 1706 | + if (localAdjust != null) { | |
| 1707 | + this.add(localAdjust, 'm'); | |
| 1708 | + } | |
| 1709 | + if (offset !== input) { | |
| 1710 | + if (!keepLocalTime || this._changeInProgress) { | |
| 1711 | + add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false); | |
| 1712 | + } else if (!this._changeInProgress) { | |
| 1713 | + this._changeInProgress = true; | |
| 1714 | + utils_hooks__hooks.updateOffset(this, true); | |
| 1715 | + this._changeInProgress = null; | |
| 1716 | + } | |
| 1717 | + } | |
| 1718 | + return this; | |
| 1719 | + } else { | |
| 1720 | + return this._isUTC ? offset : getDateOffset(this); | |
| 1721 | + } | |
| 1722 | + } | |
| 1723 | + | |
| 1724 | + function getSetZone (input, keepLocalTime) { | |
| 1725 | + if (input != null) { | |
| 1726 | + if (typeof input !== 'string') { | |
| 1727 | + input = -input; | |
| 1728 | + } | |
| 1729 | + | |
| 1730 | + this.utcOffset(input, keepLocalTime); | |
| 1731 | + | |
| 1732 | + return this; | |
| 1733 | + } else { | |
| 1734 | + return -this.utcOffset(); | |
| 1735 | + } | |
| 1736 | + } | |
| 1737 | + | |
| 1738 | + function setOffsetToUTC (keepLocalTime) { | |
| 1739 | + return this.utcOffset(0, keepLocalTime); | |
| 1740 | + } | |
| 1741 | + | |
| 1742 | + function setOffsetToLocal (keepLocalTime) { | |
| 1743 | + if (this._isUTC) { | |
| 1744 | + this.utcOffset(0, keepLocalTime); | |
| 1745 | + this._isUTC = false; | |
| 1746 | + | |
| 1747 | + if (keepLocalTime) { | |
| 1748 | + this.subtract(getDateOffset(this), 'm'); | |
| 1749 | + } | |
| 1750 | + } | |
| 1751 | + return this; | |
| 1752 | + } | |
| 1753 | + | |
| 1754 | + function setOffsetToParsedOffset () { | |
| 1755 | + if (this._tzm) { | |
| 1756 | + this.utcOffset(this._tzm); | |
| 1757 | + } else if (typeof this._i === 'string') { | |
| 1758 | + this.utcOffset(offsetFromString(matchOffset, this._i)); | |
| 1759 | + } | |
| 1760 | + return this; | |
| 1761 | + } | |
| 1762 | + | |
| 1763 | + function hasAlignedHourOffset (input) { | |
| 1764 | + if (!this.isValid()) { | |
| 1765 | + return false; | |
| 1766 | + } | |
| 1767 | + input = input ? local__createLocal(input).utcOffset() : 0; | |
| 1768 | + | |
| 1769 | + return (this.utcOffset() - input) % 60 === 0; | |
| 1770 | + } | |
| 1771 | + | |
| 1772 | + function isDaylightSavingTime () { | |
| 1773 | + return ( | |
| 1774 | + this.utcOffset() > this.clone().month(0).utcOffset() || | |
| 1775 | + this.utcOffset() > this.clone().month(5).utcOffset() | |
| 1776 | + ); | |
| 1777 | + } | |
| 1778 | + | |
| 1779 | + function isDaylightSavingTimeShifted () { | |
| 1780 | + if (!isUndefined(this._isDSTShifted)) { | |
| 1781 | + return this._isDSTShifted; | |
| 1782 | + } | |
| 1783 | + | |
| 1784 | + var c = {}; | |
| 1785 | + | |
| 1786 | + copyConfig(c, this); | |
| 1787 | + c = prepareConfig(c); | |
| 1788 | + | |
| 1789 | + if (c._a) { | |
| 1790 | + var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a); | |
| 1791 | + this._isDSTShifted = this.isValid() && | |
| 1792 | + compareArrays(c._a, other.toArray()) > 0; | |
| 1793 | + } else { | |
| 1794 | + this._isDSTShifted = false; | |
| 1795 | + } | |
| 1796 | + | |
| 1797 | + return this._isDSTShifted; | |
| 1798 | + } | |
| 1799 | + | |
| 1800 | + function isLocal () { | |
| 1801 | + return this.isValid() ? !this._isUTC : false; | |
| 1802 | + } | |
| 1803 | + | |
| 1804 | + function isUtcOffset () { | |
| 1805 | + return this.isValid() ? this._isUTC : false; | |
| 1806 | + } | |
| 1807 | + | |
| 1808 | + function isUtc () { | |
| 1809 | + return this.isValid() ? this._isUTC && this._offset === 0 : false; | |
| 1810 | + } | |
| 1811 | + | |
| 1812 | + // ASP.NET json date format regex | |
| 1813 | + var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/; | |
| 1814 | + | |
| 1815 | + // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html | |
| 1816 | + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere | |
| 1817 | + var isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/; | |
| 1818 | + | |
| 1819 | + function create__createDuration (input, key) { | |
| 1820 | + var duration = input, | |
| 1821 | + // matching against regexp is expensive, do it on demand | |
| 1822 | + match = null, | |
| 1823 | + sign, | |
| 1824 | + ret, | |
| 1825 | + diffRes; | |
| 1826 | + | |
| 1827 | + if (isDuration(input)) { | |
| 1828 | + duration = { | |
| 1829 | + ms : input._milliseconds, | |
| 1830 | + d : input._days, | |
| 1831 | + M : input._months | |
| 1832 | + }; | |
| 1833 | + } else if (typeof input === 'number') { | |
| 1834 | + duration = {}; | |
| 1835 | + if (key) { | |
| 1836 | + duration[key] = input; | |
| 1837 | + } else { | |
| 1838 | + duration.milliseconds = input; | |
| 1839 | + } | |
| 1840 | + } else if (!!(match = aspNetRegex.exec(input))) { | |
| 1841 | + sign = (match[1] === '-') ? -1 : 1; | |
| 1842 | + duration = { | |
| 1843 | + y : 0, | |
| 1844 | + d : toInt(match[DATE]) * sign, | |
| 1845 | + h : toInt(match[HOUR]) * sign, | |
| 1846 | + m : toInt(match[MINUTE]) * sign, | |
| 1847 | + s : toInt(match[SECOND]) * sign, | |
| 1848 | + ms : toInt(match[MILLISECOND]) * sign | |
| 1849 | + }; | |
| 1850 | + } else if (!!(match = isoRegex.exec(input))) { | |
| 1851 | + sign = (match[1] === '-') ? -1 : 1; | |
| 1852 | + duration = { | |
| 1853 | + y : parseIso(match[2], sign), | |
| 1854 | + M : parseIso(match[3], sign), | |
| 1855 | + d : parseIso(match[4], sign), | |
| 1856 | + h : parseIso(match[5], sign), | |
| 1857 | + m : parseIso(match[6], sign), | |
| 1858 | + s : parseIso(match[7], sign), | |
| 1859 | + w : parseIso(match[8], sign) | |
| 1860 | + }; | |
| 1861 | + } else if (duration == null) {// checks for null or undefined | |
| 1862 | + duration = {}; | |
| 1863 | + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { | |
| 1864 | + diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to)); | |
| 1865 | + | |
| 1866 | + duration = {}; | |
| 1867 | + duration.ms = diffRes.milliseconds; | |
| 1868 | + duration.M = diffRes.months; | |
| 1869 | + } | |
| 1870 | + | |
| 1871 | + ret = new Duration(duration); | |
| 1872 | + | |
| 1873 | + if (isDuration(input) && hasOwnProp(input, '_locale')) { | |
| 1874 | + ret._locale = input._locale; | |
| 1875 | + } | |
| 1876 | + | |
| 1877 | + return ret; | |
| 1878 | + } | |
| 1879 | + | |
| 1880 | + create__createDuration.fn = Duration.prototype; | |
| 1881 | + | |
| 1882 | + function parseIso (inp, sign) { | |
| 1883 | + // We'd normally use ~~inp for this, but unfortunately it also | |
| 1884 | + // converts floats to ints. | |
| 1885 | + // inp may be undefined, so careful calling replace on it. | |
| 1886 | + var res = inp && parseFloat(inp.replace(',', '.')); | |
| 1887 | + // apply sign while we're at it | |
| 1888 | + return (isNaN(res) ? 0 : res) * sign; | |
| 1889 | + } | |
| 1890 | + | |
| 1891 | + function positiveMomentsDifference(base, other) { | |
| 1892 | + var res = {milliseconds: 0, months: 0}; | |
| 1893 | + | |
| 1894 | + res.months = other.month() - base.month() + | |
| 1895 | + (other.year() - base.year()) * 12; | |
| 1896 | + if (base.clone().add(res.months, 'M').isAfter(other)) { | |
| 1897 | + --res.months; | |
| 1898 | + } | |
| 1899 | + | |
| 1900 | + res.milliseconds = +other - +(base.clone().add(res.months, 'M')); | |
| 1901 | + | |
| 1902 | + return res; | |
| 1903 | + } | |
| 1904 | + | |
| 1905 | + function momentsDifference(base, other) { | |
| 1906 | + var res; | |
| 1907 | + if (!(base.isValid() && other.isValid())) { | |
| 1908 | + return {milliseconds: 0, months: 0}; | |
| 1909 | + } | |
| 1910 | + | |
| 1911 | + other = cloneWithOffset(other, base); | |
| 1912 | + if (base.isBefore(other)) { | |
| 1913 | + res = positiveMomentsDifference(base, other); | |
| 1914 | + } else { | |
| 1915 | + res = positiveMomentsDifference(other, base); | |
| 1916 | + res.milliseconds = -res.milliseconds; | |
| 1917 | + res.months = -res.months; | |
| 1918 | + } | |
| 1919 | + | |
| 1920 | + return res; | |
| 1921 | + } | |
| 1922 | + | |
| 1923 | + // TODO: remove 'name' arg after deprecation is removed | |
| 1924 | + function createAdder(direction, name) { | |
| 1925 | + return function (val, period) { | |
| 1926 | + var dur, tmp; | |
| 1927 | + //invert the arguments, but complain about it | |
| 1928 | + if (period !== null && !isNaN(+period)) { | |
| 1929 | + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).'); | |
| 1930 | + tmp = val; val = period; period = tmp; | |
| 1931 | + } | |
| 1932 | + | |
| 1933 | + val = typeof val === 'string' ? +val : val; | |
| 1934 | + dur = create__createDuration(val, period); | |
| 1935 | + add_subtract__addSubtract(this, dur, direction); | |
| 1936 | + return this; | |
| 1937 | + }; | |
| 1938 | + } | |
| 1939 | + | |
| 1940 | + function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) { | |
| 1941 | + var milliseconds = duration._milliseconds, | |
| 1942 | + days = duration._days, | |
| 1943 | + months = duration._months; | |
| 1944 | + | |
| 1945 | + if (!mom.isValid()) { | |
| 1946 | + // No op | |
| 1947 | + return; | |
| 1948 | + } | |
| 1949 | + | |
| 1950 | + updateOffset = updateOffset == null ? true : updateOffset; | |
| 1951 | + | |
| 1952 | + if (milliseconds) { | |
| 1953 | + mom._d.setTime(+mom._d + milliseconds * isAdding); | |
| 1954 | + } | |
| 1955 | + if (days) { | |
| 1956 | + get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding); | |
| 1957 | + } | |
| 1958 | + if (months) { | |
| 1959 | + setMonth(mom, get_set__get(mom, 'Month') + months * isAdding); | |
| 1960 | + } | |
| 1961 | + if (updateOffset) { | |
| 1962 | + utils_hooks__hooks.updateOffset(mom, days || months); | |
| 1963 | + } | |
| 1964 | + } | |
| 1965 | + | |
| 1966 | + var add_subtract__add = createAdder(1, 'add'); | |
| 1967 | + var add_subtract__subtract = createAdder(-1, 'subtract'); | |
| 1968 | + | |
| 1969 | + function moment_calendar__calendar (time, formats) { | |
| 1970 | + // We want to compare the start of today, vs this. | |
| 1971 | + // Getting start-of-today depends on whether we're local/utc/offset or not. | |
| 1972 | + var now = time || local__createLocal(), | |
| 1973 | + sod = cloneWithOffset(now, this).startOf('day'), | |
| 1974 | + diff = this.diff(sod, 'days', true), | |
| 1975 | + format = diff < -6 ? 'sameElse' : | |
| 1976 | + diff < -1 ? 'lastWeek' : | |
| 1977 | + diff < 0 ? 'lastDay' : | |
| 1978 | + diff < 1 ? 'sameDay' : | |
| 1979 | + diff < 2 ? 'nextDay' : | |
| 1980 | + diff < 7 ? 'nextWeek' : 'sameElse'; | |
| 1981 | + | |
| 1982 | + var output = formats && (isFunction(formats[format]) ? formats[format]() : formats[format]); | |
| 1983 | + | |
| 1984 | + return this.format(output || this.localeData().calendar(format, this, local__createLocal(now))); | |
| 1985 | + } | |
| 1986 | + | |
| 1987 | + function clone () { | |
| 1988 | + return new Moment(this); | |
| 1989 | + } | |
| 1990 | + | |
| 1991 | + function isAfter (input, units) { | |
| 1992 | + var localInput = isMoment(input) ? input : local__createLocal(input); | |
| 1993 | + if (!(this.isValid() && localInput.isValid())) { | |
| 1994 | + return false; | |
| 1995 | + } | |
| 1996 | + units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); | |
| 1997 | + if (units === 'millisecond') { | |
| 1998 | + return +this > +localInput; | |
| 1999 | + } else { | |
| 2000 | + return +localInput < +this.clone().startOf(units); | |
| 2001 | + } | |
| 2002 | + } | |
| 2003 | + | |
| 2004 | + function isBefore (input, units) { | |
| 2005 | + var localInput = isMoment(input) ? input : local__createLocal(input); | |
| 2006 | + if (!(this.isValid() && localInput.isValid())) { | |
| 2007 | + return false; | |
| 2008 | + } | |
| 2009 | + units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); | |
| 2010 | + if (units === 'millisecond') { | |
| 2011 | + return +this < +localInput; | |
| 2012 | + } else { | |
| 2013 | + return +this.clone().endOf(units) < +localInput; | |
| 2014 | + } | |
| 2015 | + } | |
| 2016 | + | |
| 2017 | + function isBetween (from, to, units) { | |
| 2018 | + return this.isAfter(from, units) && this.isBefore(to, units); | |
| 2019 | + } | |
| 2020 | + | |
| 2021 | + function isSame (input, units) { | |
| 2022 | + var localInput = isMoment(input) ? input : local__createLocal(input), | |
| 2023 | + inputMs; | |
| 2024 | + if (!(this.isValid() && localInput.isValid())) { | |
| 2025 | + return false; | |
| 2026 | + } | |
| 2027 | + units = normalizeUnits(units || 'millisecond'); | |
| 2028 | + if (units === 'millisecond') { | |
| 2029 | + return +this === +localInput; | |
| 2030 | + } else { | |
| 2031 | + inputMs = +localInput; | |
| 2032 | + return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units)); | |
| 2033 | + } | |
| 2034 | + } | |
| 2035 | + | |
| 2036 | + function isSameOrAfter (input, units) { | |
| 2037 | + return this.isSame(input, units) || this.isAfter(input,units); | |
| 2038 | + } | |
| 2039 | + | |
| 2040 | + function isSameOrBefore (input, units) { | |
| 2041 | + return this.isSame(input, units) || this.isBefore(input,units); | |
| 2042 | + } | |
| 2043 | + | |
| 2044 | + function diff (input, units, asFloat) { | |
| 2045 | + var that, | |
| 2046 | + zoneDelta, | |
| 2047 | + delta, output; | |
| 2048 | + | |
| 2049 | + if (!this.isValid()) { | |
| 2050 | + return NaN; | |
| 2051 | + } | |
| 2052 | + | |
| 2053 | + that = cloneWithOffset(input, this); | |
| 2054 | + | |
| 2055 | + if (!that.isValid()) { | |
| 2056 | + return NaN; | |
| 2057 | + } | |
| 2058 | + | |
| 2059 | + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; | |
| 2060 | + | |
| 2061 | + units = normalizeUnits(units); | |
| 2062 | + | |
| 2063 | + if (units === 'year' || units === 'month' || units === 'quarter') { | |
| 2064 | + output = monthDiff(this, that); | |
| 2065 | + if (units === 'quarter') { | |
| 2066 | + output = output / 3; | |
| 2067 | + } else if (units === 'year') { | |
| 2068 | + output = output / 12; | |
| 2069 | + } | |
| 2070 | + } else { | |
| 2071 | + delta = this - that; | |
| 2072 | + output = units === 'second' ? delta / 1e3 : // 1000 | |
| 2073 | + units === 'minute' ? delta / 6e4 : // 1000 * 60 | |
| 2074 | + units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60 | |
| 2075 | + units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst | |
| 2076 | + units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst | |
| 2077 | + delta; | |
| 2078 | + } | |
| 2079 | + return asFloat ? output : absFloor(output); | |
| 2080 | + } | |
| 2081 | + | |
| 2082 | + function monthDiff (a, b) { | |
| 2083 | + // difference in months | |
| 2084 | + var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), | |
| 2085 | + // b is in (anchor - 1 month, anchor + 1 month) | |
| 2086 | + anchor = a.clone().add(wholeMonthDiff, 'months'), | |
| 2087 | + anchor2, adjust; | |
| 2088 | + | |
| 2089 | + if (b - anchor < 0) { | |
| 2090 | + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); | |
| 2091 | + // linear across the month | |
| 2092 | + adjust = (b - anchor) / (anchor - anchor2); | |
| 2093 | + } else { | |
| 2094 | + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); | |
| 2095 | + // linear across the month | |
| 2096 | + adjust = (b - anchor) / (anchor2 - anchor); | |
| 2097 | + } | |
| 2098 | + | |
| 2099 | + return -(wholeMonthDiff + adjust); | |
| 2100 | + } | |
| 2101 | + | |
| 2102 | + utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; | |
| 2103 | + | |
| 2104 | + function toString () { | |
| 2105 | + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); | |
| 2106 | + } | |
| 2107 | + | |
| 2108 | + function moment_format__toISOString () { | |
| 2109 | + var m = this.clone().utc(); | |
| 2110 | + if (0 < m.year() && m.year() <= 9999) { | |
| 2111 | + if (isFunction(Date.prototype.toISOString)) { | |
| 2112 | + // native implementation is ~50x faster, use it when we can | |
| 2113 | + return this.toDate().toISOString(); | |
| 2114 | + } else { | |
| 2115 | + return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); | |
| 2116 | + } | |
| 2117 | + } else { | |
| 2118 | + return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); | |
| 2119 | + } | |
| 2120 | + } | |
| 2121 | + | |
| 2122 | + function moment_format__format (inputString) { | |
| 2123 | + var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat); | |
| 2124 | + return this.localeData().postformat(output); | |
| 2125 | + } | |
| 2126 | + | |
| 2127 | + function from (time, withoutSuffix) { | |
| 2128 | + if (this.isValid() && | |
| 2129 | + ((isMoment(time) && time.isValid()) || | |
| 2130 | + local__createLocal(time).isValid())) { | |
| 2131 | + return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); | |
| 2132 | + } else { | |
| 2133 | + return this.localeData().invalidDate(); | |
| 2134 | + } | |
| 2135 | + } | |
| 2136 | + | |
| 2137 | + function fromNow (withoutSuffix) { | |
| 2138 | + return this.from(local__createLocal(), withoutSuffix); | |
| 2139 | + } | |
| 2140 | + | |
| 2141 | + function to (time, withoutSuffix) { | |
| 2142 | + if (this.isValid() && | |
| 2143 | + ((isMoment(time) && time.isValid()) || | |
| 2144 | + local__createLocal(time).isValid())) { | |
| 2145 | + return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); | |
| 2146 | + } else { | |
| 2147 | + return this.localeData().invalidDate(); | |
| 2148 | + } | |
| 2149 | + } | |
| 2150 | + | |
| 2151 | + function toNow (withoutSuffix) { | |
| 2152 | + return this.to(local__createLocal(), withoutSuffix); | |
| 2153 | + } | |
| 2154 | + | |
| 2155 | + // If passed a locale key, it will set the locale for this | |
| 2156 | + // instance. Otherwise, it will return the locale configuration | |
| 2157 | + // variables for this instance. | |
| 2158 | + function locale (key) { | |
| 2159 | + var newLocaleData; | |
| 2160 | + | |
| 2161 | + if (key === undefined) { | |
| 2162 | + return this._locale._abbr; | |
| 2163 | + } else { | |
| 2164 | + newLocaleData = locale_locales__getLocale(key); | |
| 2165 | + if (newLocaleData != null) { | |
| 2166 | + this._locale = newLocaleData; | |
| 2167 | + } | |
| 2168 | + return this; | |
| 2169 | + } | |
| 2170 | + } | |
| 2171 | + | |
| 2172 | + var lang = deprecate( | |
| 2173 | + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', | |
| 2174 | + function (key) { | |
| 2175 | + if (key === undefined) { | |
| 2176 | + return this.localeData(); | |
| 2177 | + } else { | |
| 2178 | + return this.locale(key); | |
| 2179 | + } | |
| 2180 | + } | |
| 2181 | + ); | |
| 2182 | + | |
| 2183 | + function localeData () { | |
| 2184 | + return this._locale; | |
| 2185 | + } | |
| 2186 | + | |
| 2187 | + function startOf (units) { | |
| 2188 | + units = normalizeUnits(units); | |
| 2189 | + // the following switch intentionally omits break keywords | |
| 2190 | + // to utilize falling through the cases. | |
| 2191 | + switch (units) { | |
| 2192 | + case 'year': | |
| 2193 | + this.month(0); | |
| 2194 | + /* falls through */ | |
| 2195 | + case 'quarter': | |
| 2196 | + case 'month': | |
| 2197 | + this.date(1); | |
| 2198 | + /* falls through */ | |
| 2199 | + case 'week': | |
| 2200 | + case 'isoWeek': | |
| 2201 | + case 'day': | |
| 2202 | + this.hours(0); | |
| 2203 | + /* falls through */ | |
| 2204 | + case 'hour': | |
| 2205 | + this.minutes(0); | |
| 2206 | + /* falls through */ | |
| 2207 | + case 'minute': | |
| 2208 | + this.seconds(0); | |
| 2209 | + /* falls through */ | |
| 2210 | + case 'second': | |
| 2211 | + this.milliseconds(0); | |
| 2212 | + } | |
| 2213 | + | |
| 2214 | + // weeks are a special case | |
| 2215 | + if (units === 'week') { | |
| 2216 | + this.weekday(0); | |
| 2217 | + } | |
| 2218 | + if (units === 'isoWeek') { | |
| 2219 | + this.isoWeekday(1); | |
| 2220 | + } | |
| 2221 | + | |
| 2222 | + // quarters are also special | |
| 2223 | + if (units === 'quarter') { | |
| 2224 | + this.month(Math.floor(this.month() / 3) * 3); | |
| 2225 | + } | |
| 2226 | + | |
| 2227 | + return this; | |
| 2228 | + } | |
| 2229 | + | |
| 2230 | + function endOf (units) { | |
| 2231 | + units = normalizeUnits(units); | |
| 2232 | + if (units === undefined || units === 'millisecond') { | |
| 2233 | + return this; | |
| 2234 | + } | |
| 2235 | + return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); | |
| 2236 | + } | |
| 2237 | + | |
| 2238 | + function to_type__valueOf () { | |
| 2239 | + return +this._d - ((this._offset || 0) * 60000); | |
| 2240 | + } | |
| 2241 | + | |
| 2242 | + function unix () { | |
| 2243 | + return Math.floor(+this / 1000); | |
| 2244 | + } | |
| 2245 | + | |
| 2246 | + function toDate () { | |
| 2247 | + return this._offset ? new Date(+this) : this._d; | |
| 2248 | + } | |
| 2249 | + | |
| 2250 | + function toArray () { | |
| 2251 | + var m = this; | |
| 2252 | + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; | |
| 2253 | + } | |
| 2254 | + | |
| 2255 | + function toObject () { | |
| 2256 | + var m = this; | |
| 2257 | + return { | |
| 2258 | + years: m.year(), | |
| 2259 | + months: m.month(), | |
| 2260 | + date: m.date(), | |
| 2261 | + hours: m.hours(), | |
| 2262 | + minutes: m.minutes(), | |
| 2263 | + seconds: m.seconds(), | |
| 2264 | + milliseconds: m.milliseconds() | |
| 2265 | + }; | |
| 2266 | + } | |
| 2267 | + | |
| 2268 | + function toJSON () { | |
| 2269 | + // JSON.stringify(new Date(NaN)) === 'null' | |
| 2270 | + return this.isValid() ? this.toISOString() : 'null'; | |
| 2271 | + } | |
| 2272 | + | |
| 2273 | + function moment_valid__isValid () { | |
| 2274 | + return valid__isValid(this); | |
| 2275 | + } | |
| 2276 | + | |
| 2277 | + function parsingFlags () { | |
| 2278 | + return extend({}, getParsingFlags(this)); | |
| 2279 | + } | |
| 2280 | + | |
| 2281 | + function invalidAt () { | |
| 2282 | + return getParsingFlags(this).overflow; | |
| 2283 | + } | |
| 2284 | + | |
| 2285 | + function creationData() { | |
| 2286 | + return { | |
| 2287 | + input: this._i, | |
| 2288 | + format: this._f, | |
| 2289 | + locale: this._locale, | |
| 2290 | + isUTC: this._isUTC, | |
| 2291 | + strict: this._strict | |
| 2292 | + }; | |
| 2293 | + } | |
| 2294 | + | |
| 2295 | + // FORMATTING | |
| 2296 | + | |
| 2297 | + addFormatToken(0, ['gg', 2], 0, function () { | |
| 2298 | + return this.weekYear() % 100; | |
| 2299 | + }); | |
| 2300 | + | |
| 2301 | + addFormatToken(0, ['GG', 2], 0, function () { | |
| 2302 | + return this.isoWeekYear() % 100; | |
| 2303 | + }); | |
| 2304 | + | |
| 2305 | + function addWeekYearFormatToken (token, getter) { | |
| 2306 | + addFormatToken(0, [token, token.length], 0, getter); | |
| 2307 | + } | |
| 2308 | + | |
| 2309 | + addWeekYearFormatToken('gggg', 'weekYear'); | |
| 2310 | + addWeekYearFormatToken('ggggg', 'weekYear'); | |
| 2311 | + addWeekYearFormatToken('GGGG', 'isoWeekYear'); | |
| 2312 | + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); | |
| 2313 | + | |
| 2314 | + // ALIASES | |
| 2315 | + | |
| 2316 | + addUnitAlias('weekYear', 'gg'); | |
| 2317 | + addUnitAlias('isoWeekYear', 'GG'); | |
| 2318 | + | |
| 2319 | + // PARSING | |
| 2320 | + | |
| 2321 | + addRegexToken('G', matchSigned); | |
| 2322 | + addRegexToken('g', matchSigned); | |
| 2323 | + addRegexToken('GG', match1to2, match2); | |
| 2324 | + addRegexToken('gg', match1to2, match2); | |
| 2325 | + addRegexToken('GGGG', match1to4, match4); | |
| 2326 | + addRegexToken('gggg', match1to4, match4); | |
| 2327 | + addRegexToken('GGGGG', match1to6, match6); | |
| 2328 | + addRegexToken('ggggg', match1to6, match6); | |
| 2329 | + | |
| 2330 | + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { | |
| 2331 | + week[token.substr(0, 2)] = toInt(input); | |
| 2332 | + }); | |
| 2333 | + | |
| 2334 | + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { | |
| 2335 | + week[token] = utils_hooks__hooks.parseTwoDigitYear(input); | |
| 2336 | + }); | |
| 2337 | + | |
| 2338 | + // MOMENTS | |
| 2339 | + | |
| 2340 | + function getSetWeekYear (input) { | |
| 2341 | + return getSetWeekYearHelper.call(this, | |
| 2342 | + input, | |
| 2343 | + this.week(), | |
| 2344 | + this.weekday(), | |
| 2345 | + this.localeData()._week.dow, | |
| 2346 | + this.localeData()._week.doy); | |
| 2347 | + } | |
| 2348 | + | |
| 2349 | + function getSetISOWeekYear (input) { | |
| 2350 | + return getSetWeekYearHelper.call(this, | |
| 2351 | + input, this.isoWeek(), this.isoWeekday(), 1, 4); | |
| 2352 | + } | |
| 2353 | + | |
| 2354 | + function getISOWeeksInYear () { | |
| 2355 | + return weeksInYear(this.year(), 1, 4); | |
| 2356 | + } | |
| 2357 | + | |
| 2358 | + function getWeeksInYear () { | |
| 2359 | + var weekInfo = this.localeData()._week; | |
| 2360 | + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); | |
| 2361 | + } | |
| 2362 | + | |
| 2363 | + function getSetWeekYearHelper(input, week, weekday, dow, doy) { | |
| 2364 | + var weeksTarget; | |
| 2365 | + if (input == null) { | |
| 2366 | + return weekOfYear(this, dow, doy).year; | |
| 2367 | + } else { | |
| 2368 | + weeksTarget = weeksInYear(input, dow, doy); | |
| 2369 | + if (week > weeksTarget) { | |
| 2370 | + week = weeksTarget; | |
| 2371 | + } | |
| 2372 | + return setWeekAll.call(this, input, week, weekday, dow, doy); | |
| 2373 | + } | |
| 2374 | + } | |
| 2375 | + | |
| 2376 | + function setWeekAll(weekYear, week, weekday, dow, doy) { | |
| 2377 | + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), | |
| 2378 | + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); | |
| 2379 | + | |
| 2380 | + // console.log("got", weekYear, week, weekday, "set", date.toISOString()); | |
| 2381 | + this.year(date.getUTCFullYear()); | |
| 2382 | + this.month(date.getUTCMonth()); | |
| 2383 | + this.date(date.getUTCDate()); | |
| 2384 | + return this; | |
| 2385 | + } | |
| 2386 | + | |
| 2387 | + // FORMATTING | |
| 2388 | + | |
| 2389 | + addFormatToken('Q', 0, 'Qo', 'quarter'); | |
| 2390 | + | |
| 2391 | + // ALIASES | |
| 2392 | + | |
| 2393 | + addUnitAlias('quarter', 'Q'); | |
| 2394 | + | |
| 2395 | + // PARSING | |
| 2396 | + | |
| 2397 | + addRegexToken('Q', match1); | |
| 2398 | + addParseToken('Q', function (input, array) { | |
| 2399 | + array[MONTH] = (toInt(input) - 1) * 3; | |
| 2400 | + }); | |
| 2401 | + | |
| 2402 | + // MOMENTS | |
| 2403 | + | |
| 2404 | + function getSetQuarter (input) { | |
| 2405 | + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); | |
| 2406 | + } | |
| 2407 | + | |
| 2408 | + // FORMATTING | |
| 2409 | + | |
| 2410 | + addFormatToken('w', ['ww', 2], 'wo', 'week'); | |
| 2411 | + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); | |
| 2412 | + | |
| 2413 | + // ALIASES | |
| 2414 | + | |
| 2415 | + addUnitAlias('week', 'w'); | |
| 2416 | + addUnitAlias('isoWeek', 'W'); | |
| 2417 | + | |
| 2418 | + // PARSING | |
| 2419 | + | |
| 2420 | + addRegexToken('w', match1to2); | |
| 2421 | + addRegexToken('ww', match1to2, match2); | |
| 2422 | + addRegexToken('W', match1to2); | |
| 2423 | + addRegexToken('WW', match1to2, match2); | |
| 2424 | + | |
| 2425 | + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { | |
| 2426 | + week[token.substr(0, 1)] = toInt(input); | |
| 2427 | + }); | |
| 2428 | + | |
| 2429 | + // HELPERS | |
| 2430 | + | |
| 2431 | + // LOCALES | |
| 2432 | + | |
| 2433 | + function localeWeek (mom) { | |
| 2434 | + return weekOfYear(mom, this._week.dow, this._week.doy).week; | |
| 2435 | + } | |
| 2436 | + | |
| 2437 | + var defaultLocaleWeek = { | |
| 2438 | + dow : 0, // Sunday is the first day of the week. | |
| 2439 | + doy : 6 // The week that contains Jan 1st is the first week of the year. | |
| 2440 | + }; | |
| 2441 | + | |
| 2442 | + function localeFirstDayOfWeek () { | |
| 2443 | + return this._week.dow; | |
| 2444 | + } | |
| 2445 | + | |
| 2446 | + function localeFirstDayOfYear () { | |
| 2447 | + return this._week.doy; | |
| 2448 | + } | |
| 2449 | + | |
| 2450 | + // MOMENTS | |
| 2451 | + | |
| 2452 | + function getSetWeek (input) { | |
| 2453 | + var week = this.localeData().week(this); | |
| 2454 | + return input == null ? week : this.add((input - week) * 7, 'd'); | |
| 2455 | + } | |
| 2456 | + | |
| 2457 | + function getSetISOWeek (input) { | |
| 2458 | + var week = weekOfYear(this, 1, 4).week; | |
| 2459 | + return input == null ? week : this.add((input - week) * 7, 'd'); | |
| 2460 | + } | |
| 2461 | + | |
| 2462 | + // FORMATTING | |
| 2463 | + | |
| 2464 | + addFormatToken('D', ['DD', 2], 'Do', 'date'); | |
| 2465 | + | |
| 2466 | + // ALIASES | |
| 2467 | + | |
| 2468 | + addUnitAlias('date', 'D'); | |
| 2469 | + | |
| 2470 | + // PARSING | |
| 2471 | + | |
| 2472 | + addRegexToken('D', match1to2); | |
| 2473 | + addRegexToken('DD', match1to2, match2); | |
| 2474 | + addRegexToken('Do', function (isStrict, locale) { | |
| 2475 | + return isStrict ? locale._ordinalParse : locale._ordinalParseLenient; | |
| 2476 | + }); | |
| 2477 | + | |
| 2478 | + addParseToken(['D', 'DD'], DATE); | |
| 2479 | + addParseToken('Do', function (input, array) { | |
| 2480 | + array[DATE] = toInt(input.match(match1to2)[0], 10); | |
| 2481 | + }); | |
| 2482 | + | |
| 2483 | + // MOMENTS | |
| 2484 | + | |
| 2485 | + var getSetDayOfMonth = makeGetSet('Date', true); | |
| 2486 | + | |
| 2487 | + // FORMATTING | |
| 2488 | + | |
| 2489 | + addFormatToken('d', 0, 'do', 'day'); | |
| 2490 | + | |
| 2491 | + addFormatToken('dd', 0, 0, function (format) { | |
| 2492 | + return this.localeData().weekdaysMin(this, format); | |
| 2493 | + }); | |
| 2494 | + | |
| 2495 | + addFormatToken('ddd', 0, 0, function (format) { | |
| 2496 | + return this.localeData().weekdaysShort(this, format); | |
| 2497 | + }); | |
| 2498 | + | |
| 2499 | + addFormatToken('dddd', 0, 0, function (format) { | |
| 2500 | + return this.localeData().weekdays(this, format); | |
| 2501 | + }); | |
| 2502 | + | |
| 2503 | + addFormatToken('e', 0, 0, 'weekday'); | |
| 2504 | + addFormatToken('E', 0, 0, 'isoWeekday'); | |
| 2505 | + | |
| 2506 | + // ALIASES | |
| 2507 | + | |
| 2508 | + addUnitAlias('day', 'd'); | |
| 2509 | + addUnitAlias('weekday', 'e'); | |
| 2510 | + addUnitAlias('isoWeekday', 'E'); | |
| 2511 | + | |
| 2512 | + // PARSING | |
| 2513 | + | |
| 2514 | + addRegexToken('d', match1to2); | |
| 2515 | + addRegexToken('e', match1to2); | |
| 2516 | + addRegexToken('E', match1to2); | |
| 2517 | + addRegexToken('dd', matchWord); | |
| 2518 | + addRegexToken('ddd', matchWord); | |
| 2519 | + addRegexToken('dddd', matchWord); | |
| 2520 | + | |
| 2521 | + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { | |
| 2522 | + var weekday = config._locale.weekdaysParse(input, token, config._strict); | |
| 2523 | + // if we didn't get a weekday name, mark the date as invalid | |
| 2524 | + if (weekday != null) { | |
| 2525 | + week.d = weekday; | |
| 2526 | + } else { | |
| 2527 | + getParsingFlags(config).invalidWeekday = input; | |
| 2528 | + } | |
| 2529 | + }); | |
| 2530 | + | |
| 2531 | + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { | |
| 2532 | + week[token] = toInt(input); | |
| 2533 | + }); | |
| 2534 | + | |
| 2535 | + // HELPERS | |
| 2536 | + | |
| 2537 | + function parseWeekday(input, locale) { | |
| 2538 | + if (typeof input !== 'string') { | |
| 2539 | + return input; | |
| 2540 | + } | |
| 2541 | + | |
| 2542 | + if (!isNaN(input)) { | |
| 2543 | + return parseInt(input, 10); | |
| 2544 | + } | |
| 2545 | + | |
| 2546 | + input = locale.weekdaysParse(input); | |
| 2547 | + if (typeof input === 'number') { | |
| 2548 | + return input; | |
| 2549 | + } | |
| 2550 | + | |
| 2551 | + return null; | |
| 2552 | + } | |
| 2553 | + | |
| 2554 | + // LOCALES | |
| 2555 | + | |
| 2556 | + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); | |
| 2557 | + function localeWeekdays (m, format) { | |
| 2558 | + return isArray(this._weekdays) ? this._weekdays[m.day()] : | |
| 2559 | + this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; | |
| 2560 | + } | |
| 2561 | + | |
| 2562 | + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); | |
| 2563 | + function localeWeekdaysShort (m) { | |
| 2564 | + return this._weekdaysShort[m.day()]; | |
| 2565 | + } | |
| 2566 | + | |
| 2567 | + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); | |
| 2568 | + function localeWeekdaysMin (m) { | |
| 2569 | + return this._weekdaysMin[m.day()]; | |
| 2570 | + } | |
| 2571 | + | |
| 2572 | + function localeWeekdaysParse (weekdayName, format, strict) { | |
| 2573 | + var i, mom, regex; | |
| 2574 | + | |
| 2575 | + if (!this._weekdaysParse) { | |
| 2576 | + this._weekdaysParse = []; | |
| 2577 | + this._minWeekdaysParse = []; | |
| 2578 | + this._shortWeekdaysParse = []; | |
| 2579 | + this._fullWeekdaysParse = []; | |
| 2580 | + } | |
| 2581 | + | |
| 2582 | + for (i = 0; i < 7; i++) { | |
| 2583 | + // make the regex if we don't have it already | |
| 2584 | + | |
| 2585 | + mom = local__createLocal([2000, 1]).day(i); | |
| 2586 | + if (strict && !this._fullWeekdaysParse[i]) { | |
| 2587 | + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); | |
| 2588 | + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); | |
| 2589 | + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); | |
| 2590 | + } | |
| 2591 | + if (!this._weekdaysParse[i]) { | |
| 2592 | + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); | |
| 2593 | + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); | |
| 2594 | + } | |
| 2595 | + // test the regex | |
| 2596 | + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { | |
| 2597 | + return i; | |
| 2598 | + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { | |
| 2599 | + return i; | |
| 2600 | + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { | |
| 2601 | + return i; | |
| 2602 | + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { | |
| 2603 | + return i; | |
| 2604 | + } | |
| 2605 | + } | |
| 2606 | + } | |
| 2607 | + | |
| 2608 | + // MOMENTS | |
| 2609 | + | |
| 2610 | + function getSetDayOfWeek (input) { | |
| 2611 | + if (!this.isValid()) { | |
| 2612 | + return input != null ? this : NaN; | |
| 2613 | + } | |
| 2614 | + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); | |
| 2615 | + if (input != null) { | |
| 2616 | + input = parseWeekday(input, this.localeData()); | |
| 2617 | + return this.add(input - day, 'd'); | |
| 2618 | + } else { | |
| 2619 | + return day; | |
| 2620 | + } | |
| 2621 | + } | |
| 2622 | + | |
| 2623 | + function getSetLocaleDayOfWeek (input) { | |
| 2624 | + if (!this.isValid()) { | |
| 2625 | + return input != null ? this : NaN; | |
| 2626 | + } | |
| 2627 | + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; | |
| 2628 | + return input == null ? weekday : this.add(input - weekday, 'd'); | |
| 2629 | + } | |
| 2630 | + | |
| 2631 | + function getSetISODayOfWeek (input) { | |
| 2632 | + if (!this.isValid()) { | |
| 2633 | + return input != null ? this : NaN; | |
| 2634 | + } | |
| 2635 | + // behaves the same as moment#day except | |
| 2636 | + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) | |
| 2637 | + // as a setter, sunday should belong to the previous week. | |
| 2638 | + return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); | |
| 2639 | + } | |
| 2640 | + | |
| 2641 | + // FORMATTING | |
| 2642 | + | |
| 2643 | + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); | |
| 2644 | + | |
| 2645 | + // ALIASES | |
| 2646 | + | |
| 2647 | + addUnitAlias('dayOfYear', 'DDD'); | |
| 2648 | + | |
| 2649 | + // PARSING | |
| 2650 | + | |
| 2651 | + addRegexToken('DDD', match1to3); | |
| 2652 | + addRegexToken('DDDD', match3); | |
| 2653 | + addParseToken(['DDD', 'DDDD'], function (input, array, config) { | |
| 2654 | + config._dayOfYear = toInt(input); | |
| 2655 | + }); | |
| 2656 | + | |
| 2657 | + // HELPERS | |
| 2658 | + | |
| 2659 | + // MOMENTS | |
| 2660 | + | |
| 2661 | + function getSetDayOfYear (input) { | |
| 2662 | + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; | |
| 2663 | + return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); | |
| 2664 | + } | |
| 2665 | + | |
| 2666 | + // FORMATTING | |
| 2667 | + | |
| 2668 | + function hFormat() { | |
| 2669 | + return this.hours() % 12 || 12; | |
| 2670 | + } | |
| 2671 | + | |
| 2672 | + addFormatToken('H', ['HH', 2], 0, 'hour'); | |
| 2673 | + addFormatToken('h', ['hh', 2], 0, hFormat); | |
| 2674 | + | |
| 2675 | + addFormatToken('hmm', 0, 0, function () { | |
| 2676 | + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); | |
| 2677 | + }); | |
| 2678 | + | |
| 2679 | + addFormatToken('hmmss', 0, 0, function () { | |
| 2680 | + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + | |
| 2681 | + zeroFill(this.seconds(), 2); | |
| 2682 | + }); | |
| 2683 | + | |
| 2684 | + addFormatToken('Hmm', 0, 0, function () { | |
| 2685 | + return '' + this.hours() + zeroFill(this.minutes(), 2); | |
| 2686 | + }); | |
| 2687 | + | |
| 2688 | + addFormatToken('Hmmss', 0, 0, function () { | |
| 2689 | + return '' + this.hours() + zeroFill(this.minutes(), 2) + | |
| 2690 | + zeroFill(this.seconds(), 2); | |
| 2691 | + }); | |
| 2692 | + | |
| 2693 | + function meridiem (token, lowercase) { | |
| 2694 | + addFormatToken(token, 0, 0, function () { | |
| 2695 | + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); | |
| 2696 | + }); | |
| 2697 | + } | |
| 2698 | + | |
| 2699 | + meridiem('a', true); | |
| 2700 | + meridiem('A', false); | |
| 2701 | + | |
| 2702 | + // ALIASES | |
| 2703 | + | |
| 2704 | + addUnitAlias('hour', 'h'); | |
| 2705 | + | |
| 2706 | + // PARSING | |
| 2707 | + | |
| 2708 | + function matchMeridiem (isStrict, locale) { | |
| 2709 | + return locale._meridiemParse; | |
| 2710 | + } | |
| 2711 | + | |
| 2712 | + addRegexToken('a', matchMeridiem); | |
| 2713 | + addRegexToken('A', matchMeridiem); | |
| 2714 | + addRegexToken('H', match1to2); | |
| 2715 | + addRegexToken('h', match1to2); | |
| 2716 | + addRegexToken('HH', match1to2, match2); | |
| 2717 | + addRegexToken('hh', match1to2, match2); | |
| 2718 | + | |
| 2719 | + addRegexToken('hmm', match3to4); | |
| 2720 | + addRegexToken('hmmss', match5to6); | |
| 2721 | + addRegexToken('Hmm', match3to4); | |
| 2722 | + addRegexToken('Hmmss', match5to6); | |
| 2723 | + | |
| 2724 | + addParseToken(['H', 'HH'], HOUR); | |
| 2725 | + addParseToken(['a', 'A'], function (input, array, config) { | |
| 2726 | + config._isPm = config._locale.isPM(input); | |
| 2727 | + config._meridiem = input; | |
| 2728 | + }); | |
| 2729 | + addParseToken(['h', 'hh'], function (input, array, config) { | |
| 2730 | + array[HOUR] = toInt(input); | |
| 2731 | + getParsingFlags(config).bigHour = true; | |
| 2732 | + }); | |
| 2733 | + addParseToken('hmm', function (input, array, config) { | |
| 2734 | + var pos = input.length - 2; | |
| 2735 | + array[HOUR] = toInt(input.substr(0, pos)); | |
| 2736 | + array[MINUTE] = toInt(input.substr(pos)); | |
| 2737 | + getParsingFlags(config).bigHour = true; | |
| 2738 | + }); | |
| 2739 | + addParseToken('hmmss', function (input, array, config) { | |
| 2740 | + var pos1 = input.length - 4; | |
| 2741 | + var pos2 = input.length - 2; | |
| 2742 | + array[HOUR] = toInt(input.substr(0, pos1)); | |
| 2743 | + array[MINUTE] = toInt(input.substr(pos1, 2)); | |
| 2744 | + array[SECOND] = toInt(input.substr(pos2)); | |
| 2745 | + getParsingFlags(config).bigHour = true; | |
| 2746 | + }); | |
| 2747 | + addParseToken('Hmm', function (input, array, config) { | |
| 2748 | + var pos = input.length - 2; | |
| 2749 | + array[HOUR] = toInt(input.substr(0, pos)); | |
| 2750 | + array[MINUTE] = toInt(input.substr(pos)); | |
| 2751 | + }); | |
| 2752 | + addParseToken('Hmmss', function (input, array, config) { | |
| 2753 | + var pos1 = input.length - 4; | |
| 2754 | + var pos2 = input.length - 2; | |
| 2755 | + array[HOUR] = toInt(input.substr(0, pos1)); | |
| 2756 | + array[MINUTE] = toInt(input.substr(pos1, 2)); | |
| 2757 | + array[SECOND] = toInt(input.substr(pos2)); | |
| 2758 | + }); | |
| 2759 | + | |
| 2760 | + // LOCALES | |
| 2761 | + | |
| 2762 | + function localeIsPM (input) { | |
| 2763 | + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays | |
| 2764 | + // Using charAt should be more compatible. | |
| 2765 | + return ((input + '').toLowerCase().charAt(0) === 'p'); | |
| 2766 | + } | |
| 2767 | + | |
| 2768 | + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; | |
| 2769 | + function localeMeridiem (hours, minutes, isLower) { | |
| 2770 | + if (hours > 11) { | |
| 2771 | + return isLower ? 'pm' : 'PM'; | |
| 2772 | + } else { | |
| 2773 | + return isLower ? 'am' : 'AM'; | |
| 2774 | + } | |
| 2775 | + } | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + // MOMENTS | |
| 2779 | + | |
| 2780 | + // Setting the hour should keep the time, because the user explicitly | |
| 2781 | + // specified which hour he wants. So trying to maintain the same hour (in | |
| 2782 | + // a new timezone) makes sense. Adding/subtracting hours does not follow | |
| 2783 | + // this rule. | |
| 2784 | + var getSetHour = makeGetSet('Hours', true); | |
| 2785 | + | |
| 2786 | + // FORMATTING | |
| 2787 | + | |
| 2788 | + addFormatToken('m', ['mm', 2], 0, 'minute'); | |
| 2789 | + | |
| 2790 | + // ALIASES | |
| 2791 | + | |
| 2792 | + addUnitAlias('minute', 'm'); | |
| 2793 | + | |
| 2794 | + // PARSING | |
| 2795 | + | |
| 2796 | + addRegexToken('m', match1to2); | |
| 2797 | + addRegexToken('mm', match1to2, match2); | |
| 2798 | + addParseToken(['m', 'mm'], MINUTE); | |
| 2799 | + | |
| 2800 | + // MOMENTS | |
| 2801 | + | |
| 2802 | + var getSetMinute = makeGetSet('Minutes', false); | |
| 2803 | + | |
| 2804 | + // FORMATTING | |
| 2805 | + | |
| 2806 | + addFormatToken('s', ['ss', 2], 0, 'second'); | |
| 2807 | + | |
| 2808 | + // ALIASES | |
| 2809 | + | |
| 2810 | + addUnitAlias('second', 's'); | |
| 2811 | + | |
| 2812 | + // PARSING | |
| 2813 | + | |
| 2814 | + addRegexToken('s', match1to2); | |
| 2815 | + addRegexToken('ss', match1to2, match2); | |
| 2816 | + addParseToken(['s', 'ss'], SECOND); | |
| 2817 | + | |
| 2818 | + // MOMENTS | |
| 2819 | + | |
| 2820 | + var getSetSecond = makeGetSet('Seconds', false); | |
| 2821 | + | |
| 2822 | + // FORMATTING | |
| 2823 | + | |
| 2824 | + addFormatToken('S', 0, 0, function () { | |
| 2825 | + return ~~(this.millisecond() / 100); | |
| 2826 | + }); | |
| 2827 | + | |
| 2828 | + addFormatToken(0, ['SS', 2], 0, function () { | |
| 2829 | + return ~~(this.millisecond() / 10); | |
| 2830 | + }); | |
| 2831 | + | |
| 2832 | + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); | |
| 2833 | + addFormatToken(0, ['SSSS', 4], 0, function () { | |
| 2834 | + return this.millisecond() * 10; | |
| 2835 | + }); | |
| 2836 | + addFormatToken(0, ['SSSSS', 5], 0, function () { | |
| 2837 | + return this.millisecond() * 100; | |
| 2838 | + }); | |
| 2839 | + addFormatToken(0, ['SSSSSS', 6], 0, function () { | |
| 2840 | + return this.millisecond() * 1000; | |
| 2841 | + }); | |
| 2842 | + addFormatToken(0, ['SSSSSSS', 7], 0, function () { | |
| 2843 | + return this.millisecond() * 10000; | |
| 2844 | + }); | |
| 2845 | + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { | |
| 2846 | + return this.millisecond() * 100000; | |
| 2847 | + }); | |
| 2848 | + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { | |
| 2849 | + return this.millisecond() * 1000000; | |
| 2850 | + }); | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + // ALIASES | |
| 2854 | + | |
| 2855 | + addUnitAlias('millisecond', 'ms'); | |
| 2856 | + | |
| 2857 | + // PARSING | |
| 2858 | + | |
| 2859 | + addRegexToken('S', match1to3, match1); | |
| 2860 | + addRegexToken('SS', match1to3, match2); | |
| 2861 | + addRegexToken('SSS', match1to3, match3); | |
| 2862 | + | |
| 2863 | + var token; | |
| 2864 | + for (token = 'SSSS'; token.length <= 9; token += 'S') { | |
| 2865 | + addRegexToken(token, matchUnsigned); | |
| 2866 | + } | |
| 2867 | + | |
| 2868 | + function parseMs(input, array) { | |
| 2869 | + array[MILLISECOND] = toInt(('0.' + input) * 1000); | |
| 2870 | + } | |
| 2871 | + | |
| 2872 | + for (token = 'S'; token.length <= 9; token += 'S') { | |
| 2873 | + addParseToken(token, parseMs); | |
| 2874 | + } | |
| 2875 | + // MOMENTS | |
| 2876 | + | |
| 2877 | + var getSetMillisecond = makeGetSet('Milliseconds', false); | |
| 2878 | + | |
| 2879 | + // FORMATTING | |
| 2880 | + | |
| 2881 | + addFormatToken('z', 0, 0, 'zoneAbbr'); | |
| 2882 | + addFormatToken('zz', 0, 0, 'zoneName'); | |
| 2883 | + | |
| 2884 | + // MOMENTS | |
| 2885 | + | |
| 2886 | + function getZoneAbbr () { | |
| 2887 | + return this._isUTC ? 'UTC' : ''; | |
| 2888 | + } | |
| 2889 | + | |
| 2890 | + function getZoneName () { | |
| 2891 | + return this._isUTC ? 'Coordinated Universal Time' : ''; | |
| 2892 | + } | |
| 2893 | + | |
| 2894 | + var momentPrototype__proto = Moment.prototype; | |
| 2895 | + | |
| 2896 | + momentPrototype__proto.add = add_subtract__add; | |
| 2897 | + momentPrototype__proto.calendar = moment_calendar__calendar; | |
| 2898 | + momentPrototype__proto.clone = clone; | |
| 2899 | + momentPrototype__proto.diff = diff; | |
| 2900 | + momentPrototype__proto.endOf = endOf; | |
| 2901 | + momentPrototype__proto.format = moment_format__format; | |
| 2902 | + momentPrototype__proto.from = from; | |
| 2903 | + momentPrototype__proto.fromNow = fromNow; | |
| 2904 | + momentPrototype__proto.to = to; | |
| 2905 | + momentPrototype__proto.toNow = toNow; | |
| 2906 | + momentPrototype__proto.get = getSet; | |
| 2907 | + momentPrototype__proto.invalidAt = invalidAt; | |
| 2908 | + momentPrototype__proto.isAfter = isAfter; | |
| 2909 | + momentPrototype__proto.isBefore = isBefore; | |
| 2910 | + momentPrototype__proto.isBetween = isBetween; | |
| 2911 | + momentPrototype__proto.isSame = isSame; | |
| 2912 | + momentPrototype__proto.isSameOrAfter = isSameOrAfter; | |
| 2913 | + momentPrototype__proto.isSameOrBefore = isSameOrBefore; | |
| 2914 | + momentPrototype__proto.isValid = moment_valid__isValid; | |
| 2915 | + momentPrototype__proto.lang = lang; | |
| 2916 | + momentPrototype__proto.locale = locale; | |
| 2917 | + momentPrototype__proto.localeData = localeData; | |
| 2918 | + momentPrototype__proto.max = prototypeMax; | |
| 2919 | + momentPrototype__proto.min = prototypeMin; | |
| 2920 | + momentPrototype__proto.parsingFlags = parsingFlags; | |
| 2921 | + momentPrototype__proto.set = getSet; | |
| 2922 | + momentPrototype__proto.startOf = startOf; | |
| 2923 | + momentPrototype__proto.subtract = add_subtract__subtract; | |
| 2924 | + momentPrototype__proto.toArray = toArray; | |
| 2925 | + momentPrototype__proto.toObject = toObject; | |
| 2926 | + momentPrototype__proto.toDate = toDate; | |
| 2927 | + momentPrototype__proto.toISOString = moment_format__toISOString; | |
| 2928 | + momentPrototype__proto.toJSON = toJSON; | |
| 2929 | + momentPrototype__proto.toString = toString; | |
| 2930 | + momentPrototype__proto.unix = unix; | |
| 2931 | + momentPrototype__proto.valueOf = to_type__valueOf; | |
| 2932 | + momentPrototype__proto.creationData = creationData; | |
| 2933 | + | |
| 2934 | + // Year | |
| 2935 | + momentPrototype__proto.year = getSetYear; | |
| 2936 | + momentPrototype__proto.isLeapYear = getIsLeapYear; | |
| 2937 | + | |
| 2938 | + // Week Year | |
| 2939 | + momentPrototype__proto.weekYear = getSetWeekYear; | |
| 2940 | + momentPrototype__proto.isoWeekYear = getSetISOWeekYear; | |
| 2941 | + | |
| 2942 | + // Quarter | |
| 2943 | + momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter; | |
| 2944 | + | |
| 2945 | + // Month | |
| 2946 | + momentPrototype__proto.month = getSetMonth; | |
| 2947 | + momentPrototype__proto.daysInMonth = getDaysInMonth; | |
| 2948 | + | |
| 2949 | + // Week | |
| 2950 | + momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek; | |
| 2951 | + momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek; | |
| 2952 | + momentPrototype__proto.weeksInYear = getWeeksInYear; | |
| 2953 | + momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear; | |
| 2954 | + | |
| 2955 | + // Day | |
| 2956 | + momentPrototype__proto.date = getSetDayOfMonth; | |
| 2957 | + momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek; | |
| 2958 | + momentPrototype__proto.weekday = getSetLocaleDayOfWeek; | |
| 2959 | + momentPrototype__proto.isoWeekday = getSetISODayOfWeek; | |
| 2960 | + momentPrototype__proto.dayOfYear = getSetDayOfYear; | |
| 2961 | + | |
| 2962 | + // Hour | |
| 2963 | + momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour; | |
| 2964 | + | |
| 2965 | + // Minute | |
| 2966 | + momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute; | |
| 2967 | + | |
| 2968 | + // Second | |
| 2969 | + momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond; | |
| 2970 | + | |
| 2971 | + // Millisecond | |
| 2972 | + momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond; | |
| 2973 | + | |
| 2974 | + // Offset | |
| 2975 | + momentPrototype__proto.utcOffset = getSetOffset; | |
| 2976 | + momentPrototype__proto.utc = setOffsetToUTC; | |
| 2977 | + momentPrototype__proto.local = setOffsetToLocal; | |
| 2978 | + momentPrototype__proto.parseZone = setOffsetToParsedOffset; | |
| 2979 | + momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset; | |
| 2980 | + momentPrototype__proto.isDST = isDaylightSavingTime; | |
| 2981 | + momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted; | |
| 2982 | + momentPrototype__proto.isLocal = isLocal; | |
| 2983 | + momentPrototype__proto.isUtcOffset = isUtcOffset; | |
| 2984 | + momentPrototype__proto.isUtc = isUtc; | |
| 2985 | + momentPrototype__proto.isUTC = isUtc; | |
| 2986 | + | |
| 2987 | + // Timezone | |
| 2988 | + momentPrototype__proto.zoneAbbr = getZoneAbbr; | |
| 2989 | + momentPrototype__proto.zoneName = getZoneName; | |
| 2990 | + | |
| 2991 | + // Deprecations | |
| 2992 | + momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); | |
| 2993 | + momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); | |
| 2994 | + momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); | |
| 2995 | + momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone); | |
| 2996 | + | |
| 2997 | + var momentPrototype = momentPrototype__proto; | |
| 2998 | + | |
| 2999 | + function moment_moment__createUnix (input) { | |
| 3000 | + return local__createLocal(input * 1000); | |
| 3001 | + } | |
| 3002 | + | |
| 3003 | + function moment_moment__createInZone () { | |
| 3004 | + return local__createLocal.apply(null, arguments).parseZone(); | |
| 3005 | + } | |
| 3006 | + | |
| 3007 | + var defaultCalendar = { | |
| 3008 | + sameDay : '[Today at] LT', | |
| 3009 | + nextDay : '[Tomorrow at] LT', | |
| 3010 | + nextWeek : 'dddd [at] LT', | |
| 3011 | + lastDay : '[Yesterday at] LT', | |
| 3012 | + lastWeek : '[Last] dddd [at] LT', | |
| 3013 | + sameElse : 'L' | |
| 3014 | + }; | |
| 3015 | + | |
| 3016 | + function locale_calendar__calendar (key, mom, now) { | |
| 3017 | + var output = this._calendar[key]; | |
| 3018 | + return isFunction(output) ? output.call(mom, now) : output; | |
| 3019 | + } | |
| 3020 | + | |
| 3021 | + var defaultLongDateFormat = { | |
| 3022 | + LTS : 'h:mm:ss A', | |
| 3023 | + LT : 'h:mm A', | |
| 3024 | + L : 'MM/DD/YYYY', | |
| 3025 | + LL : 'MMMM D, YYYY', | |
| 3026 | + LLL : 'MMMM D, YYYY h:mm A', | |
| 3027 | + LLLL : 'dddd, MMMM D, YYYY h:mm A' | |
| 3028 | + }; | |
| 3029 | + | |
| 3030 | + function longDateFormat (key) { | |
| 3031 | + var format = this._longDateFormat[key], | |
| 3032 | + formatUpper = this._longDateFormat[key.toUpperCase()]; | |
| 3033 | + | |
| 3034 | + if (format || !formatUpper) { | |
| 3035 | + return format; | |
| 3036 | + } | |
| 3037 | + | |
| 3038 | + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { | |
| 3039 | + return val.slice(1); | |
| 3040 | + }); | |
| 3041 | + | |
| 3042 | + return this._longDateFormat[key]; | |
| 3043 | + } | |
| 3044 | + | |
| 3045 | + var defaultInvalidDate = 'Invalid date'; | |
| 3046 | + | |
| 3047 | + function invalidDate () { | |
| 3048 | + return this._invalidDate; | |
| 3049 | + } | |
| 3050 | + | |
| 3051 | + var defaultOrdinal = '%d'; | |
| 3052 | + var defaultOrdinalParse = /\d{1,2}/; | |
| 3053 | + | |
| 3054 | + function ordinal (number) { | |
| 3055 | + return this._ordinal.replace('%d', number); | |
| 3056 | + } | |
| 3057 | + | |
| 3058 | + function preParsePostFormat (string) { | |
| 3059 | + return string; | |
| 3060 | + } | |
| 3061 | + | |
| 3062 | + var defaultRelativeTime = { | |
| 3063 | + future : 'in %s', | |
| 3064 | + past : '%s ago', | |
| 3065 | + s : 'a few seconds', | |
| 3066 | + m : 'a minute', | |
| 3067 | + mm : '%d minutes', | |
| 3068 | + h : 'an hour', | |
| 3069 | + hh : '%d hours', | |
| 3070 | + d : 'a day', | |
| 3071 | + dd : '%d days', | |
| 3072 | + M : 'a month', | |
| 3073 | + MM : '%d months', | |
| 3074 | + y : 'a year', | |
| 3075 | + yy : '%d years' | |
| 3076 | + }; | |
| 3077 | + | |
| 3078 | + function relative__relativeTime (number, withoutSuffix, string, isFuture) { | |
| 3079 | + var output = this._relativeTime[string]; | |
| 3080 | + return (isFunction(output)) ? | |
| 3081 | + output(number, withoutSuffix, string, isFuture) : | |
| 3082 | + output.replace(/%d/i, number); | |
| 3083 | + } | |
| 3084 | + | |
| 3085 | + function pastFuture (diff, output) { | |
| 3086 | + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; | |
| 3087 | + return isFunction(format) ? format(output) : format.replace(/%s/i, output); | |
| 3088 | + } | |
| 3089 | + | |
| 3090 | + function locale_set__set (config) { | |
| 3091 | + var prop, i; | |
| 3092 | + for (i in config) { | |
| 3093 | + prop = config[i]; | |
| 3094 | + if (isFunction(prop)) { | |
| 3095 | + this[i] = prop; | |
| 3096 | + } else { | |
| 3097 | + this['_' + i] = prop; | |
| 3098 | + } | |
| 3099 | + } | |
| 3100 | + // Lenient ordinal parsing accepts just a number in addition to | |
| 3101 | + // number + (possibly) stuff coming from _ordinalParseLenient. | |
| 3102 | + this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source); | |
| 3103 | + } | |
| 3104 | + | |
| 3105 | + var prototype__proto = Locale.prototype; | |
| 3106 | + | |
| 3107 | + prototype__proto._calendar = defaultCalendar; | |
| 3108 | + prototype__proto.calendar = locale_calendar__calendar; | |
| 3109 | + prototype__proto._longDateFormat = defaultLongDateFormat; | |
| 3110 | + prototype__proto.longDateFormat = longDateFormat; | |
| 3111 | + prototype__proto._invalidDate = defaultInvalidDate; | |
| 3112 | + prototype__proto.invalidDate = invalidDate; | |
| 3113 | + prototype__proto._ordinal = defaultOrdinal; | |
| 3114 | + prototype__proto.ordinal = ordinal; | |
| 3115 | + prototype__proto._ordinalParse = defaultOrdinalParse; | |
| 3116 | + prototype__proto.preparse = preParsePostFormat; | |
| 3117 | + prototype__proto.postformat = preParsePostFormat; | |
| 3118 | + prototype__proto._relativeTime = defaultRelativeTime; | |
| 3119 | + prototype__proto.relativeTime = relative__relativeTime; | |
| 3120 | + prototype__proto.pastFuture = pastFuture; | |
| 3121 | + prototype__proto.set = locale_set__set; | |
| 3122 | + | |
| 3123 | + // Month | |
| 3124 | + prototype__proto.months = localeMonths; | |
| 3125 | + prototype__proto._months = defaultLocaleMonths; | |
| 3126 | + prototype__proto.monthsShort = localeMonthsShort; | |
| 3127 | + prototype__proto._monthsShort = defaultLocaleMonthsShort; | |
| 3128 | + prototype__proto.monthsParse = localeMonthsParse; | |
| 3129 | + prototype__proto._monthsRegex = defaultMonthsRegex; | |
| 3130 | + prototype__proto.monthsRegex = monthsRegex; | |
| 3131 | + prototype__proto._monthsShortRegex = defaultMonthsShortRegex; | |
| 3132 | + prototype__proto.monthsShortRegex = monthsShortRegex; | |
| 3133 | + | |
| 3134 | + // Week | |
| 3135 | + prototype__proto.week = localeWeek; | |
| 3136 | + prototype__proto._week = defaultLocaleWeek; | |
| 3137 | + prototype__proto.firstDayOfYear = localeFirstDayOfYear; | |
| 3138 | + prototype__proto.firstDayOfWeek = localeFirstDayOfWeek; | |
| 3139 | + | |
| 3140 | + // Day of Week | |
| 3141 | + prototype__proto.weekdays = localeWeekdays; | |
| 3142 | + prototype__proto._weekdays = defaultLocaleWeekdays; | |
| 3143 | + prototype__proto.weekdaysMin = localeWeekdaysMin; | |
| 3144 | + prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin; | |
| 3145 | + prototype__proto.weekdaysShort = localeWeekdaysShort; | |
| 3146 | + prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort; | |
| 3147 | + prototype__proto.weekdaysParse = localeWeekdaysParse; | |
| 3148 | + | |
| 3149 | + // Hours | |
| 3150 | + prototype__proto.isPM = localeIsPM; | |
| 3151 | + prototype__proto._meridiemParse = defaultLocaleMeridiemParse; | |
| 3152 | + prototype__proto.meridiem = localeMeridiem; | |
| 3153 | + | |
| 3154 | + function lists__get (format, index, field, setter) { | |
| 3155 | + var locale = locale_locales__getLocale(); | |
| 3156 | + var utc = create_utc__createUTC().set(setter, index); | |
| 3157 | + return locale[field](utc, format); | |
| 3158 | + } | |
| 3159 | + | |
| 3160 | + function list (format, index, field, count, setter) { | |
| 3161 | + if (typeof format === 'number') { | |
| 3162 | + index = format; | |
| 3163 | + format = undefined; | |
| 3164 | + } | |
| 3165 | + | |
| 3166 | + format = format || ''; | |
| 3167 | + | |
| 3168 | + if (index != null) { | |
| 3169 | + return lists__get(format, index, field, setter); | |
| 3170 | + } | |
| 3171 | + | |
| 3172 | + var i; | |
| 3173 | + var out = []; | |
| 3174 | + for (i = 0; i < count; i++) { | |
| 3175 | + out[i] = lists__get(format, i, field, setter); | |
| 3176 | + } | |
| 3177 | + return out; | |
| 3178 | + } | |
| 3179 | + | |
| 3180 | + function lists__listMonths (format, index) { | |
| 3181 | + return list(format, index, 'months', 12, 'month'); | |
| 3182 | + } | |
| 3183 | + | |
| 3184 | + function lists__listMonthsShort (format, index) { | |
| 3185 | + return list(format, index, 'monthsShort', 12, 'month'); | |
| 3186 | + } | |
| 3187 | + | |
| 3188 | + function lists__listWeekdays (format, index) { | |
| 3189 | + return list(format, index, 'weekdays', 7, 'day'); | |
| 3190 | + } | |
| 3191 | + | |
| 3192 | + function lists__listWeekdaysShort (format, index) { | |
| 3193 | + return list(format, index, 'weekdaysShort', 7, 'day'); | |
| 3194 | + } | |
| 3195 | + | |
| 3196 | + function lists__listWeekdaysMin (format, index) { | |
| 3197 | + return list(format, index, 'weekdaysMin', 7, 'day'); | |
| 3198 | + } | |
| 3199 | + | |
| 3200 | + locale_locales__getSetGlobalLocale('en', { | |
| 3201 | + ordinalParse: /\d{1,2}(th|st|nd|rd)/, | |
| 3202 | + ordinal : function (number) { | |
| 3203 | + var b = number % 10, | |
| 3204 | + output = (toInt(number % 100 / 10) === 1) ? 'th' : | |
| 3205 | + (b === 1) ? 'st' : | |
| 3206 | + (b === 2) ? 'nd' : | |
| 3207 | + (b === 3) ? 'rd' : 'th'; | |
| 3208 | + return number + output; | |
| 3209 | + } | |
| 3210 | + }); | |
| 3211 | + | |
| 3212 | + // Side effect imports | |
| 3213 | + utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale); | |
| 3214 | + utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale); | |
| 3215 | + | |
| 3216 | + var mathAbs = Math.abs; | |
| 3217 | + | |
| 3218 | + function duration_abs__abs () { | |
| 3219 | + var data = this._data; | |
| 3220 | + | |
| 3221 | + this._milliseconds = mathAbs(this._milliseconds); | |
| 3222 | + this._days = mathAbs(this._days); | |
| 3223 | + this._months = mathAbs(this._months); | |
| 3224 | + | |
| 3225 | + data.milliseconds = mathAbs(data.milliseconds); | |
| 3226 | + data.seconds = mathAbs(data.seconds); | |
| 3227 | + data.minutes = mathAbs(data.minutes); | |
| 3228 | + data.hours = mathAbs(data.hours); | |
| 3229 | + data.months = mathAbs(data.months); | |
| 3230 | + data.years = mathAbs(data.years); | |
| 3231 | + | |
| 3232 | + return this; | |
| 3233 | + } | |
| 3234 | + | |
| 3235 | + function duration_add_subtract__addSubtract (duration, input, value, direction) { | |
| 3236 | + var other = create__createDuration(input, value); | |
| 3237 | + | |
| 3238 | + duration._milliseconds += direction * other._milliseconds; | |
| 3239 | + duration._days += direction * other._days; | |
| 3240 | + duration._months += direction * other._months; | |
| 3241 | + | |
| 3242 | + return duration._bubble(); | |
| 3243 | + } | |
| 3244 | + | |
| 3245 | + // supports only 2.0-style add(1, 's') or add(duration) | |
| 3246 | + function duration_add_subtract__add (input, value) { | |
| 3247 | + return duration_add_subtract__addSubtract(this, input, value, 1); | |
| 3248 | + } | |
| 3249 | + | |
| 3250 | + // supports only 2.0-style subtract(1, 's') or subtract(duration) | |
| 3251 | + function duration_add_subtract__subtract (input, value) { | |
| 3252 | + return duration_add_subtract__addSubtract(this, input, value, -1); | |
| 3253 | + } | |
| 3254 | + | |
| 3255 | + function absCeil (number) { | |
| 3256 | + if (number < 0) { | |
| 3257 | + return Math.floor(number); | |
| 3258 | + } else { | |
| 3259 | + return Math.ceil(number); | |
| 3260 | + } | |
| 3261 | + } | |
| 3262 | + | |
| 3263 | + function bubble () { | |
| 3264 | + var milliseconds = this._milliseconds; | |
| 3265 | + var days = this._days; | |
| 3266 | + var months = this._months; | |
| 3267 | + var data = this._data; | |
| 3268 | + var seconds, minutes, hours, years, monthsFromDays; | |
| 3269 | + | |
| 3270 | + // if we have a mix of positive and negative values, bubble down first | |
| 3271 | + // check: https://github.com/moment/moment/issues/2166 | |
| 3272 | + if (!((milliseconds >= 0 && days >= 0 && months >= 0) || | |
| 3273 | + (milliseconds <= 0 && days <= 0 && months <= 0))) { | |
| 3274 | + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; | |
| 3275 | + days = 0; | |
| 3276 | + months = 0; | |
| 3277 | + } | |
| 3278 | + | |
| 3279 | + // The following code bubbles up values, see the tests for | |
| 3280 | + // examples of what that means. | |
| 3281 | + data.milliseconds = milliseconds % 1000; | |
| 3282 | + | |
| 3283 | + seconds = absFloor(milliseconds / 1000); | |
| 3284 | + data.seconds = seconds % 60; | |
| 3285 | + | |
| 3286 | + minutes = absFloor(seconds / 60); | |
| 3287 | + data.minutes = minutes % 60; | |
| 3288 | + | |
| 3289 | + hours = absFloor(minutes / 60); | |
| 3290 | + data.hours = hours % 24; | |
| 3291 | + | |
| 3292 | + days += absFloor(hours / 24); | |
| 3293 | + | |
| 3294 | + // convert days to months | |
| 3295 | + monthsFromDays = absFloor(daysToMonths(days)); | |
| 3296 | + months += monthsFromDays; | |
| 3297 | + days -= absCeil(monthsToDays(monthsFromDays)); | |
| 3298 | + | |
| 3299 | + // 12 months -> 1 year | |
| 3300 | + years = absFloor(months / 12); | |
| 3301 | + months %= 12; | |
| 3302 | + | |
| 3303 | + data.days = days; | |
| 3304 | + data.months = months; | |
| 3305 | + data.years = years; | |
| 3306 | + | |
| 3307 | + return this; | |
| 3308 | + } | |
| 3309 | + | |
| 3310 | + function daysToMonths (days) { | |
| 3311 | + // 400 years have 146097 days (taking into account leap year rules) | |
| 3312 | + // 400 years have 12 months === 4800 | |
| 3313 | + return days * 4800 / 146097; | |
| 3314 | + } | |
| 3315 | + | |
| 3316 | + function monthsToDays (months) { | |
| 3317 | + // the reverse of daysToMonths | |
| 3318 | + return months * 146097 / 4800; | |
| 3319 | + } | |
| 3320 | + | |
| 3321 | + function as (units) { | |
| 3322 | + var days; | |
| 3323 | + var months; | |
| 3324 | + var milliseconds = this._milliseconds; | |
| 3325 | + | |
| 3326 | + units = normalizeUnits(units); | |
| 3327 | + | |
| 3328 | + if (units === 'month' || units === 'year') { | |
| 3329 | + days = this._days + milliseconds / 864e5; | |
| 3330 | + months = this._months + daysToMonths(days); | |
| 3331 | + return units === 'month' ? months : months / 12; | |
| 3332 | + } else { | |
| 3333 | + // handle milliseconds separately because of floating point math errors (issue #1867) | |
| 3334 | + days = this._days + Math.round(monthsToDays(this._months)); | |
| 3335 | + switch (units) { | |
| 3336 | + case 'week' : return days / 7 + milliseconds / 6048e5; | |
| 3337 | + case 'day' : return days + milliseconds / 864e5; | |
| 3338 | + case 'hour' : return days * 24 + milliseconds / 36e5; | |
| 3339 | + case 'minute' : return days * 1440 + milliseconds / 6e4; | |
| 3340 | + case 'second' : return days * 86400 + milliseconds / 1000; | |
| 3341 | + // Math.floor prevents floating point math errors here | |
| 3342 | + case 'millisecond': return Math.floor(days * 864e5) + milliseconds; | |
| 3343 | + default: throw new Error('Unknown unit ' + units); | |
| 3344 | + } | |
| 3345 | + } | |
| 3346 | + } | |
| 3347 | + | |
| 3348 | + // TODO: Use this.as('ms')? | |
| 3349 | + function duration_as__valueOf () { | |
| 3350 | + return ( | |
| 3351 | + this._milliseconds + | |
| 3352 | + this._days * 864e5 + | |
| 3353 | + (this._months % 12) * 2592e6 + | |
| 3354 | + toInt(this._months / 12) * 31536e6 | |
| 3355 | + ); | |
| 3356 | + } | |
| 3357 | + | |
| 3358 | + function makeAs (alias) { | |
| 3359 | + return function () { | |
| 3360 | + return this.as(alias); | |
| 3361 | + }; | |
| 3362 | + } | |
| 3363 | + | |
| 3364 | + var asMilliseconds = makeAs('ms'); | |
| 3365 | + var asSeconds = makeAs('s'); | |
| 3366 | + var asMinutes = makeAs('m'); | |
| 3367 | + var asHours = makeAs('h'); | |
| 3368 | + var asDays = makeAs('d'); | |
| 3369 | + var asWeeks = makeAs('w'); | |
| 3370 | + var asMonths = makeAs('M'); | |
| 3371 | + var asYears = makeAs('y'); | |
| 3372 | + | |
| 3373 | + function duration_get__get (units) { | |
| 3374 | + units = normalizeUnits(units); | |
| 3375 | + return this[units + 's'](); | |
| 3376 | + } | |
| 3377 | + | |
| 3378 | + function makeGetter(name) { | |
| 3379 | + return function () { | |
| 3380 | + return this._data[name]; | |
| 3381 | + }; | |
| 3382 | + } | |
| 3383 | + | |
| 3384 | + var milliseconds = makeGetter('milliseconds'); | |
| 3385 | + var seconds = makeGetter('seconds'); | |
| 3386 | + var minutes = makeGetter('minutes'); | |
| 3387 | + var hours = makeGetter('hours'); | |
| 3388 | + var days = makeGetter('days'); | |
| 3389 | + var duration_get__months = makeGetter('months'); | |
| 3390 | + var years = makeGetter('years'); | |
| 3391 | + | |
| 3392 | + function weeks () { | |
| 3393 | + return absFloor(this.days() / 7); | |
| 3394 | + } | |
| 3395 | + | |
| 3396 | + var round = Math.round; | |
| 3397 | + var thresholds = { | |
| 3398 | + s: 45, // seconds to minute | |
| 3399 | + m: 45, // minutes to hour | |
| 3400 | + h: 22, // hours to day | |
| 3401 | + d: 26, // days to month | |
| 3402 | + M: 11 // months to year | |
| 3403 | + }; | |
| 3404 | + | |
| 3405 | + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize | |
| 3406 | + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { | |
| 3407 | + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); | |
| 3408 | + } | |
| 3409 | + | |
| 3410 | + function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) { | |
| 3411 | + var duration = create__createDuration(posNegDuration).abs(); | |
| 3412 | + var seconds = round(duration.as('s')); | |
| 3413 | + var minutes = round(duration.as('m')); | |
| 3414 | + var hours = round(duration.as('h')); | |
| 3415 | + var days = round(duration.as('d')); | |
| 3416 | + var months = round(duration.as('M')); | |
| 3417 | + var years = round(duration.as('y')); | |
| 3418 | + | |
| 3419 | + var a = seconds < thresholds.s && ['s', seconds] || | |
| 3420 | + minutes <= 1 && ['m'] || | |
| 3421 | + minutes < thresholds.m && ['mm', minutes] || | |
| 3422 | + hours <= 1 && ['h'] || | |
| 3423 | + hours < thresholds.h && ['hh', hours] || | |
| 3424 | + days <= 1 && ['d'] || | |
| 3425 | + days < thresholds.d && ['dd', days] || | |
| 3426 | + months <= 1 && ['M'] || | |
| 3427 | + months < thresholds.M && ['MM', months] || | |
| 3428 | + years <= 1 && ['y'] || ['yy', years]; | |
| 3429 | + | |
| 3430 | + a[2] = withoutSuffix; | |
| 3431 | + a[3] = +posNegDuration > 0; | |
| 3432 | + a[4] = locale; | |
| 3433 | + return substituteTimeAgo.apply(null, a); | |
| 3434 | + } | |
| 3435 | + | |
| 3436 | + // This function allows you to set a threshold for relative time strings | |
| 3437 | + function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) { | |
| 3438 | + if (thresholds[threshold] === undefined) { | |
| 3439 | + return false; | |
| 3440 | + } | |
| 3441 | + if (limit === undefined) { | |
| 3442 | + return thresholds[threshold]; | |
| 3443 | + } | |
| 3444 | + thresholds[threshold] = limit; | |
| 3445 | + return true; | |
| 3446 | + } | |
| 3447 | + | |
| 3448 | + function humanize (withSuffix) { | |
| 3449 | + var locale = this.localeData(); | |
| 3450 | + var output = duration_humanize__relativeTime(this, !withSuffix, locale); | |
| 3451 | + | |
| 3452 | + if (withSuffix) { | |
| 3453 | + output = locale.pastFuture(+this, output); | |
| 3454 | + } | |
| 3455 | + | |
| 3456 | + return locale.postformat(output); | |
| 3457 | + } | |
| 3458 | + | |
| 3459 | + var iso_string__abs = Math.abs; | |
| 3460 | + | |
| 3461 | + function iso_string__toISOString() { | |
| 3462 | + // for ISO strings we do not use the normal bubbling rules: | |
| 3463 | + // * milliseconds bubble up until they become hours | |
| 3464 | + // * days do not bubble at all | |
| 3465 | + // * months bubble up until they become years | |
| 3466 | + // This is because there is no context-free conversion between hours and days | |
| 3467 | + // (think of clock changes) | |
| 3468 | + // and also not between days and months (28-31 days per month) | |
| 3469 | + var seconds = iso_string__abs(this._milliseconds) / 1000; | |
| 3470 | + var days = iso_string__abs(this._days); | |
| 3471 | + var months = iso_string__abs(this._months); | |
| 3472 | + var minutes, hours, years; | |
| 3473 | + | |
| 3474 | + // 3600 seconds -> 60 minutes -> 1 hour | |
| 3475 | + minutes = absFloor(seconds / 60); | |
| 3476 | + hours = absFloor(minutes / 60); | |
| 3477 | + seconds %= 60; | |
| 3478 | + minutes %= 60; | |
| 3479 | + | |
| 3480 | + // 12 months -> 1 year | |
| 3481 | + years = absFloor(months / 12); | |
| 3482 | + months %= 12; | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js | |
| 3486 | + var Y = years; | |
| 3487 | + var M = months; | |
| 3488 | + var D = days; | |
| 3489 | + var h = hours; | |
| 3490 | + var m = minutes; | |
| 3491 | + var s = seconds; | |
| 3492 | + var total = this.asSeconds(); | |
| 3493 | + | |
| 3494 | + if (!total) { | |
| 3495 | + // this is the same as C#'s (Noda) and python (isodate)... | |
| 3496 | + // but not other JS (goog.date) | |
| 3497 | + return 'P0D'; | |
| 3498 | + } | |
| 3499 | + | |
| 3500 | + return (total < 0 ? '-' : '') + | |
| 3501 | + 'P' + | |
| 3502 | + (Y ? Y + 'Y' : '') + | |
| 3503 | + (M ? M + 'M' : '') + | |
| 3504 | + (D ? D + 'D' : '') + | |
| 3505 | + ((h || m || s) ? 'T' : '') + | |
| 3506 | + (h ? h + 'H' : '') + | |
| 3507 | + (m ? m + 'M' : '') + | |
| 3508 | + (s ? s + 'S' : ''); | |
| 3509 | + } | |
| 3510 | + | |
| 3511 | + var duration_prototype__proto = Duration.prototype; | |
| 3512 | + | |
| 3513 | + duration_prototype__proto.abs = duration_abs__abs; | |
| 3514 | + duration_prototype__proto.add = duration_add_subtract__add; | |
| 3515 | + duration_prototype__proto.subtract = duration_add_subtract__subtract; | |
| 3516 | + duration_prototype__proto.as = as; | |
| 3517 | + duration_prototype__proto.asMilliseconds = asMilliseconds; | |
| 3518 | + duration_prototype__proto.asSeconds = asSeconds; | |
| 3519 | + duration_prototype__proto.asMinutes = asMinutes; | |
| 3520 | + duration_prototype__proto.asHours = asHours; | |
| 3521 | + duration_prototype__proto.asDays = asDays; | |
| 3522 | + duration_prototype__proto.asWeeks = asWeeks; | |
| 3523 | + duration_prototype__proto.asMonths = asMonths; | |
| 3524 | + duration_prototype__proto.asYears = asYears; | |
| 3525 | + duration_prototype__proto.valueOf = duration_as__valueOf; | |
| 3526 | + duration_prototype__proto._bubble = bubble; | |
| 3527 | + duration_prototype__proto.get = duration_get__get; | |
| 3528 | + duration_prototype__proto.milliseconds = milliseconds; | |
| 3529 | + duration_prototype__proto.seconds = seconds; | |
| 3530 | + duration_prototype__proto.minutes = minutes; | |
| 3531 | + duration_prototype__proto.hours = hours; | |
| 3532 | + duration_prototype__proto.days = days; | |
| 3533 | + duration_prototype__proto.weeks = weeks; | |
| 3534 | + duration_prototype__proto.months = duration_get__months; | |
| 3535 | + duration_prototype__proto.years = years; | |
| 3536 | + duration_prototype__proto.humanize = humanize; | |
| 3537 | + duration_prototype__proto.toISOString = iso_string__toISOString; | |
| 3538 | + duration_prototype__proto.toString = iso_string__toISOString; | |
| 3539 | + duration_prototype__proto.toJSON = iso_string__toISOString; | |
| 3540 | + duration_prototype__proto.locale = locale; | |
| 3541 | + duration_prototype__proto.localeData = localeData; | |
| 3542 | + | |
| 3543 | + // Deprecations | |
| 3544 | + duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString); | |
| 3545 | + duration_prototype__proto.lang = lang; | |
| 3546 | + | |
| 3547 | + // Side effect imports | |
| 3548 | + | |
| 3549 | + // FORMATTING | |
| 3550 | + | |
| 3551 | + addFormatToken('X', 0, 0, 'unix'); | |
| 3552 | + addFormatToken('x', 0, 0, 'valueOf'); | |
| 3553 | + | |
| 3554 | + // PARSING | |
| 3555 | + | |
| 3556 | + addRegexToken('x', matchSigned); | |
| 3557 | + addRegexToken('X', matchTimestamp); | |
| 3558 | + addParseToken('X', function (input, array, config) { | |
| 3559 | + config._d = new Date(parseFloat(input, 10) * 1000); | |
| 3560 | + }); | |
| 3561 | + addParseToken('x', function (input, array, config) { | |
| 3562 | + config._d = new Date(toInt(input)); | |
| 3563 | + }); | |
| 3564 | + | |
| 3565 | + // Side effect imports | |
| 3566 | + | |
| 3567 | + ; | |
| 3568 | + | |
| 3569 | + //! moment.js | |
| 3570 | + //! version : 2.11.2 | |
| 3571 | + //! authors : Tim Wood, Iskren Chernev, Moment.js contributors | |
| 3572 | + //! license : MIT | |
| 3573 | + //! momentjs.com | |
| 3574 | + | |
| 3575 | + utils_hooks__hooks.version = '2.11.2'; | |
| 3576 | + | |
| 3577 | + setHookCallback(local__createLocal); | |
| 3578 | + | |
| 3579 | + utils_hooks__hooks.fn = momentPrototype; | |
| 3580 | + utils_hooks__hooks.min = min; | |
| 3581 | + utils_hooks__hooks.max = max; | |
| 3582 | + utils_hooks__hooks.now = now; | |
| 3583 | + utils_hooks__hooks.utc = create_utc__createUTC; | |
| 3584 | + utils_hooks__hooks.unix = moment_moment__createUnix; | |
| 3585 | + utils_hooks__hooks.months = lists__listMonths; | |
| 3586 | + utils_hooks__hooks.isDate = isDate; | |
| 3587 | + utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale; | |
| 3588 | + utils_hooks__hooks.invalid = valid__createInvalid; | |
| 3589 | + utils_hooks__hooks.duration = create__createDuration; | |
| 3590 | + utils_hooks__hooks.isMoment = isMoment; | |
| 3591 | + utils_hooks__hooks.weekdays = lists__listWeekdays; | |
| 3592 | + utils_hooks__hooks.parseZone = moment_moment__createInZone; | |
| 3593 | + utils_hooks__hooks.localeData = locale_locales__getLocale; | |
| 3594 | + utils_hooks__hooks.isDuration = isDuration; | |
| 3595 | + utils_hooks__hooks.monthsShort = lists__listMonthsShort; | |
| 3596 | + utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin; | |
| 3597 | + utils_hooks__hooks.defineLocale = defineLocale; | |
| 3598 | + utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; | |
| 3599 | + utils_hooks__hooks.normalizeUnits = normalizeUnits; | |
| 3600 | + utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; | |
| 3601 | + utils_hooks__hooks.prototype = momentPrototype; | |
| 3602 | + | |
| 3603 | + var moment__default = utils_hooks__hooks; | |
| 3604 | + | |
| 3605 | + //! moment.js locale configuration | |
| 3606 | + //! locale : afrikaans (af) | |
| 3607 | + //! author : Werner Mollentze : https://github.com/wernerm | |
| 3608 | + | |
| 3609 | + var af = moment__default.defineLocale('af', { | |
| 3610 | + months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'), | |
| 3611 | + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), | |
| 3612 | + weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'), | |
| 3613 | + weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), | |
| 3614 | + weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), | |
| 3615 | + meridiemParse: /vm|nm/i, | |
| 3616 | + isPM : function (input) { | |
| 3617 | + return /^nm$/i.test(input); | |
| 3618 | + }, | |
| 3619 | + meridiem : function (hours, minutes, isLower) { | |
| 3620 | + if (hours < 12) { | |
| 3621 | + return isLower ? 'vm' : 'VM'; | |
| 3622 | + } else { | |
| 3623 | + return isLower ? 'nm' : 'NM'; | |
| 3624 | + } | |
| 3625 | + }, | |
| 3626 | + longDateFormat : { | |
| 3627 | + LT : 'HH:mm', | |
| 3628 | + LTS : 'HH:mm:ss', | |
| 3629 | + L : 'DD/MM/YYYY', | |
| 3630 | + LL : 'D MMMM YYYY', | |
| 3631 | + LLL : 'D MMMM YYYY HH:mm', | |
| 3632 | + LLLL : 'dddd, D MMMM YYYY HH:mm' | |
| 3633 | + }, | |
| 3634 | + calendar : { | |
| 3635 | + sameDay : '[Vandag om] LT', | |
| 3636 | + nextDay : '[Môre om] LT', | |
| 3637 | + nextWeek : 'dddd [om] LT', | |
| 3638 | + lastDay : '[Gister om] LT', | |
| 3639 | + lastWeek : '[Laas] dddd [om] LT', | |
| 3640 | + sameElse : 'L' | |
| 3641 | + }, | |
| 3642 | + relativeTime : { | |
| 3643 | + future : 'oor %s', | |
| 3644 | + past : '%s gelede', | |
| 3645 | + s : '\'n paar sekondes', | |
| 3646 | + m : '\'n minuut', | |
| 3647 | + mm : '%d minute', | |
| 3648 | + h : '\'n uur', | |
| 3649 | + hh : '%d ure', | |
| 3650 | + d : '\'n dag', | |
| 3651 | + dd : '%d dae', | |
| 3652 | + M : '\'n maand', | |
| 3653 | + MM : '%d maande', | |
| 3654 | + y : '\'n jaar', | |
| 3655 | + yy : '%d jaar' | |
| 3656 | + }, | |
| 3657 | + ordinalParse: /\d{1,2}(ste|de)/, | |
| 3658 | + ordinal : function (number) { | |
| 3659 | + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter | |
| 3660 | + }, | |
| 3661 | + week : { | |
| 3662 | + dow : 1, // Maandag is die eerste dag van die week. | |
| 3663 | + doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar. | |
| 3664 | + } | |
| 3665 | + }); | |
| 3666 | + | |
| 3667 | + //! moment.js locale configuration | |
| 3668 | + //! locale : Moroccan Arabic (ar-ma) | |
| 3669 | + //! author : ElFadili Yassine : https://github.com/ElFadiliY | |
| 3670 | + //! author : Abdel Said : https://github.com/abdelsaid | |
| 3671 | + | |
| 3672 | + var ar_ma = moment__default.defineLocale('ar-ma', { | |
| 3673 | + months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), | |
| 3674 | + monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), | |
| 3675 | + weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), | |
| 3676 | + weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), | |
| 3677 | + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), | |
| 3678 | + longDateFormat : { | |
| 3679 | + LT : 'HH:mm', | |
| 3680 | + LTS : 'HH:mm:ss', | |
| 3681 | + L : 'DD/MM/YYYY', | |
| 3682 | + LL : 'D MMMM YYYY', | |
| 3683 | + LLL : 'D MMMM YYYY HH:mm', | |
| 3684 | + LLLL : 'dddd D MMMM YYYY HH:mm' | |
| 3685 | + }, | |
| 3686 | + calendar : { | |
| 3687 | + sameDay: '[اليوم على الساعة] LT', | |
| 3688 | + nextDay: '[غدا على الساعة] LT', | |
| 3689 | + nextWeek: 'dddd [على الساعة] LT', | |
| 3690 | + lastDay: '[أمس على الساعة] LT', | |
| 3691 | + lastWeek: 'dddd [على الساعة] LT', | |
| 3692 | + sameElse: 'L' | |
| 3693 | + }, | |
| 3694 | + relativeTime : { | |
| 3695 | + future : 'في %s', | |
| 3696 | + past : 'منذ %s', | |
| 3697 | + s : 'ثوان', | |
| 3698 | + m : 'دقيقة', | |
| 3699 | + mm : '%d دقائق', | |
| 3700 | + h : 'ساعة', | |
| 3701 | + hh : '%d ساعات', | |
| 3702 | + d : 'يوم', | |
| 3703 | + dd : '%d أيام', | |
| 3704 | + M : 'شهر', | |
| 3705 | + MM : '%d أشهر', | |
| 3706 | + y : 'سنة', | |
| 3707 | + yy : '%d سنوات' | |
| 3708 | + }, | |
| 3709 | + week : { | |
| 3710 | + dow : 6, // Saturday is the first day of the week. | |
| 3711 | + doy : 12 // The week that contains Jan 1st is the first week of the year. | |
| 3712 | + } | |
| 3713 | + }); | |
| 3714 | + | |
| 3715 | + //! moment.js locale configuration | |
| 3716 | + //! locale : Arabic Saudi Arabia (ar-sa) | |
| 3717 | + //! author : Suhail Alkowaileet : https://github.com/xsoh | |
| 3718 | + | |
| 3719 | + var ar_sa__symbolMap = { | |
| 3720 | + '1': '١', | |
| 3721 | + '2': '٢', | |
| 3722 | + '3': '٣', | |
| 3723 | + '4': '٤', | |
| 3724 | + '5': '٥', | |
| 3725 | + '6': '٦', | |
| 3726 | + '7': '٧', | |
| 3727 | + '8': '٨', | |
| 3728 | + '9': '٩', | |
| 3729 | + '0': '٠' | |
| 3730 | + }, ar_sa__numberMap = { | |
| 3731 | + '١': '1', | |
| 3732 | + '٢': '2', | |
| 3733 | + '٣': '3', | |
| 3734 | + '٤': '4', | |
| 3735 | + '٥': '5', | |
| 3736 | + '٦': '6', | |
| 3737 | + '٧': '7', | |
| 3738 | + '٨': '8', | |
| 3739 | + '٩': '9', | |
| 3740 | + '٠': '0' | |
| 3741 | + }; | |
| 3742 | + | |
| 3743 | + var ar_sa = moment__default.defineLocale('ar-sa', { | |
| 3744 | + months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), | |
| 3745 | + monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), | |
| 3746 | + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), | |
| 3747 | + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), | |
| 3748 | + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), | |
| 3749 | + longDateFormat : { | |
| 3750 | + LT : 'HH:mm', | |
| 3751 | + LTS : 'HH:mm:ss', | |
| 3752 | + L : 'DD/MM/YYYY', | |
| 3753 | + LL : 'D MMMM YYYY', | |
| 3754 | + LLL : 'D MMMM YYYY HH:mm', | |
| 3755 | + LLLL : 'dddd D MMMM YYYY HH:mm' | |
| 3756 | + }, | |
| 3757 | + meridiemParse: /ص|م/, | |
| 3758 | + isPM : function (input) { | |
| 3759 | + return 'م' === input; | |
| 3760 | + }, | |
| 3761 | + meridiem : function (hour, minute, isLower) { | |
| 3762 | + if (hour < 12) { | |
| 3763 | + return 'ص'; | |
| 3764 | + } else { | |
| 3765 | + return 'م'; | |
| 3766 | + } | |
| 3767 | + }, | |
| 3768 | + calendar : { | |
| 3769 | + sameDay: '[اليوم على الساعة] LT', | |
| 3770 | + nextDay: '[غدا على الساعة] LT', | |
| 3771 | + nextWeek: 'dddd [على الساعة] LT', | |
| 3772 | + lastDay: '[أمس على الساعة] LT', | |
| 3773 | + lastWeek: 'dddd [على الساعة] LT', | |
| 3774 | + sameElse: 'L' | |
| 3775 | + }, | |
| 3776 | + relativeTime : { | |
| 3777 | + future : 'في %s', | |
| 3778 | + past : 'منذ %s', | |
| 3779 | + s : 'ثوان', | |
| 3780 | + m : 'دقيقة', | |
| 3781 | + mm : '%d دقائق', | |
| 3782 | + h : 'ساعة', | |
| 3783 | + hh : '%d ساعات', | |
| 3784 | + d : 'يوم', | |
| 3785 | + dd : '%d أيام', | |
| 3786 | + M : 'شهر', | |
| 3787 | + MM : '%d أشهر', | |
| 3788 | + y : 'سنة', | |
| 3789 | + yy : '%d سنوات' | |
| 3790 | + }, | |
| 3791 | + preparse: function (string) { | |
| 3792 | + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { | |
| 3793 | + return ar_sa__numberMap[match]; | |
| 3794 | + }).replace(/،/g, ','); | |
| 3795 | + }, | |
| 3796 | + postformat: function (string) { | |
| 3797 | + return string.replace(/\d/g, function (match) { | |
| 3798 | + return ar_sa__symbolMap[match]; | |
| 3799 | + }).replace(/,/g, '،'); | |
| 3800 | + }, | |
| 3801 | + week : { | |
| 3802 | + dow : 6, // Saturday is the first day of the week. | |
| 3803 | + doy : 12 // The week that contains Jan 1st is the first week of the year. | |
| 3804 | + } | |
| 3805 | + }); | |
| 3806 | + | |
| 3807 | + //! moment.js locale configuration | |
| 3808 | + //! locale : Tunisian Arabic (ar-tn) | |
| 3809 | + | |
| 3810 | + var ar_tn = moment__default.defineLocale('ar-tn', { | |
| 3811 | + months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), | |
| 3812 | + monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), | |
| 3813 | + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), | |
| 3814 | + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), | |
| 3815 | + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), | |
| 3816 | + longDateFormat: { | |
| 3817 | + LT: 'HH:mm', | |
| 3818 | + LTS: 'HH:mm:ss', | |
| 3819 | + L: 'DD/MM/YYYY', | |
| 3820 | + LL: 'D MMMM YYYY', | |
| 3821 | + LLL: 'D MMMM YYYY HH:mm', | |
| 3822 | + LLLL: 'dddd D MMMM YYYY HH:mm' | |
| 3823 | + }, | |
| 3824 | + calendar: { | |
| 3825 | + sameDay: '[اليوم على الساعة] LT', | |
| 3826 | + nextDay: '[غدا على الساعة] LT', | |
| 3827 | + nextWeek: 'dddd [على الساعة] LT', | |
| 3828 | + lastDay: '[أمس على الساعة] LT', | |
| 3829 | + lastWeek: 'dddd [على الساعة] LT', | |
| 3830 | + sameElse: 'L' | |
| 3831 | + }, | |
| 3832 | + relativeTime: { | |
| 3833 | + future: 'في %s', | |
| 3834 | + past: 'منذ %s', | |
| 3835 | + s: 'ثوان', | |
| 3836 | + m: 'دقيقة', | |
| 3837 | + mm: '%d دقائق', | |
| 3838 | + h: 'ساعة', | |
| 3839 | + hh: '%d ساعات', | |
| 3840 | + d: 'يوم', | |
| 3841 | + dd: '%d أيام', | |
| 3842 | + M: 'شهر', | |
| 3843 | + MM: '%d أشهر', | |
| 3844 | + y: 'سنة', | |
| 3845 | + yy: '%d سنوات' | |
| 3846 | + }, | |
| 3847 | + week: { | |
| 3848 | + dow: 1, // Monday is the first day of the week. | |
| 3849 | + doy: 4 // The week that contains Jan 4th is the first week of the year. | |
| 3850 | + } | |
| 3851 | + }); | |
| 3852 | + | |
| 3853 | + //! moment.js locale configuration | |
| 3854 | + //! Locale: Arabic (ar) | |
| 3855 | + //! Author: Abdel Said: https://github.com/abdelsaid | |
| 3856 | + //! Changes in months, weekdays: Ahmed Elkhatib | |
| 3857 | + //! Native plural forms: forabi https://github.com/forabi | |
| 3858 | + | |
| 3859 | + var ar__symbolMap = { | |
| 3860 | + '1': '١', | |
| 3861 | + '2': '٢', | |
| 3862 | + '3': '٣', | |
| 3863 | + '4': '٤', | |
| 3864 | + '5': '٥', | |
| 3865 | + '6': '٦', | |
| 3866 | + '7': '٧', | |
| 3867 | + '8': '٨', | |
| 3868 | + '9': '٩', | |
| 3869 | + '0': '٠' | |
| 3870 | + }, ar__numberMap = { | |
| 3871 | + '١': '1', | |
| 3872 | + '٢': '2', | |
| 3873 | + '٣': '3', | |
| 3874 | + '٤': '4', | |
| 3875 | + '٥': '5', | |
| 3876 | + '٦': '6', | |
| 3877 | + '٧': '7', | |
| 3878 | + '٨': '8', | |
| 3879 | + '٩': '9', | |
| 3880 | + '٠': '0' | |
| 3881 | + }, pluralForm = function (n) { | |
| 3882 | + return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; | |
| 3883 | + }, plurals = { | |
| 3884 | + s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], | |
| 3885 | + m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], | |
| 3886 | + h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], | |
| 3887 | + d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], | |
| 3888 | + M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], | |
| 3889 | + y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] | |
| 3890 | + }, pluralize = function (u) { | |
| 3891 | + return function (number, withoutSuffix, string, isFuture) { | |
| 3892 | + var f = pluralForm(number), | |
| 3893 | + str = plurals[u][pluralForm(number)]; | |
| 3894 | + if (f === 2) { | |
| 3895 | + str = str[withoutSuffix ? 0 : 1]; | |
| 3896 | + } | |
| 3897 | + return str.replace(/%d/i, number); | |
| 3898 | + }; | |
| 3899 | + }, ar__months = [ | |
| 3900 | + 'كانون الثاني يناير', | |
| 3901 | + 'شباط فبراير', | |
| 3902 | + 'آذار مارس', | |
| 3903 | + 'نيسان أبريل', | |
| 3904 | + 'أيار مايو', | |
| 3905 | + 'حزيران يونيو', | |
| 3906 | + 'تموز يوليو', | |
| 3907 | + 'آب أغسطس', | |
| 3908 | + 'أيلول سبتمبر', | |
| 3909 | + 'تشرين الأول أكتوبر', | |
| 3910 | + 'تشرين الثاني نوفمبر', | |
| 3911 | + 'كانون الأول ديسمبر' | |
| 3912 | + ]; | |
| 3913 | + | |
| 3914 | + var ar = moment__default.defineLocale('ar', { | |
| 3915 | + months : ar__months, | |
| 3916 | + monthsShort : ar__months, | |
| 3917 | + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), | |
| 3918 | + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), | |
| 3919 | + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), | |
| 3920 | + longDateFormat : { | |
| 3921 | + LT : 'HH:mm', | |
| 3922 | + LTS : 'HH:mm:ss', | |
| 3923 | + L : 'D/\u200FM/\u200FYYYY', | |
| 3924 | + LL : 'D MMMM YYYY', | |
| 3925 | + LLL : 'D MMMM YYYY HH:mm', | |
| 3926 | + LLLL : 'dddd D MMMM YYYY HH:mm' | |
| 3927 | + }, | |
| 3928 | + meridiemParse: /ص|م/, | |
| 3929 | + isPM : function (input) { | |
| 3930 | + return 'م' === input; | |
| 3931 | + }, | |
| 3932 | + meridiem : function (hour, minute, isLower) { | |
| 3933 | + if (hour < 12) { | |
| 3934 | + return 'ص'; | |
| 3935 | + } else { | |
| 3936 | + return 'م'; | |
| 3937 | + } | |
| 3938 | + }, | |
| 3939 | + calendar : { | |
| 3940 | + sameDay: '[اليوم عند الساعة] LT', | |
| 3941 | + nextDay: '[غدًا عند الساعة] LT', | |
| 3942 | + nextWeek: 'dddd [عند الساعة] LT', | |
| 3943 | + lastDay: '[أمس عند الساعة] LT', | |
| 3944 | + lastWeek: 'dddd [عند الساعة] LT', | |
| 3945 | + sameElse: 'L' | |
| 3946 | + }, | |
| 3947 | + relativeTime : { | |
| 3948 | + future : 'بعد %s', | |
| 3949 | + past : 'منذ %s', | |
| 3950 | + s : pluralize('s'), | |
| 3951 | + m : pluralize('m'), | |
| 3952 | + mm : pluralize('m'), | |
| 3953 | + h : pluralize('h'), | |
| 3954 | + hh : pluralize('h'), | |
| 3955 | + d : pluralize('d'), | |
| 3956 | + dd : pluralize('d'), | |
| 3957 | + M : pluralize('M'), | |
| 3958 | + MM : pluralize('M'), | |
| 3959 | + y : pluralize('y'), | |
| 3960 | + yy : pluralize('y') | |
| 3961 | + }, | |
| 3962 | + preparse: function (string) { | |
| 3963 | + return string.replace(/\u200f/g, '').replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { | |
| 3964 | + return ar__numberMap[match]; | |
| 3965 | + }).replace(/،/g, ','); | |
| 3966 | + }, | |
| 3967 | + postformat: function (string) { | |
| 3968 | + return string.replace(/\d/g, function (match) { | |
| 3969 | + return ar__symbolMap[match]; | |
| 3970 | + }).replace(/,/g, '،'); | |
| 3971 | + }, | |
| 3972 | + week : { | |
| 3973 | + dow : 6, // Saturday is the first day of the week. | |
| 3974 | + doy : 12 // The week that contains Jan 1st is the first week of the year. | |
| 3975 | + } | |
| 3976 | + }); | |
| 3977 | + | |
| 3978 | + //! moment.js locale configuration | |
| 3979 | + //! locale : azerbaijani (az) | |
| 3980 | + //! author : topchiyev : https://github.com/topchiyev | |
| 3981 | + | |
| 3982 | + var az__suffixes = { | |
| 3983 | + 1: '-inci', | |
| 3984 | + 5: '-inci', | |
| 3985 | + 8: '-inci', | |
| 3986 | + 70: '-inci', | |
| 3987 | + 80: '-inci', | |
| 3988 | + 2: '-nci', | |
| 3989 | + 7: '-nci', | |
| 3990 | + 20: '-nci', | |
| 3991 | + 50: '-nci', | |
| 3992 | + 3: '-üncü', | |
| 3993 | + 4: '-üncü', | |
| 3994 | + 100: '-üncü', | |
| 3995 | + 6: '-ncı', | |
| 3996 | + 9: '-uncu', | |
| 3997 | + 10: '-uncu', | |
| 3998 | + 30: '-uncu', | |
| 3999 | + 60: '-ıncı', | |
| 4000 | + 90: '-ıncı' | |
| 4001 | + }; | |
| 4002 | + | |
| 4003 | + var az = moment__default.defineLocale('az', { | |
| 4004 | + months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'), | |
| 4005 | + monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), | |
| 4006 | + weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'), | |
| 4007 | + weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), | |
| 4008 | + weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), | |
| 4009 | + longDateFormat : { | |
| 4010 | + LT : 'HH:mm', | |
| 4011 | + LTS : 'HH:mm:ss', | |
| 4012 | + L : 'DD.MM.YYYY', | |
| 4013 | + LL : 'D MMMM YYYY', | |
| 4014 | + LLL : 'D MMMM YYYY HH:mm', | |
| 4015 | + LLLL : 'dddd, D MMMM YYYY HH:mm' | |
| 4016 | + }, | |
| 4017 | + calendar : { | |
| 4018 | + sameDay : '[bugün saat] LT', | |
| 4019 | + nextDay : '[sabah saat] LT', | |
| 4020 | + nextWeek : '[gələn həftə] dddd [saat] LT', | |
| 4021 | + lastDay : '[dünən] LT', | |
| 4022 | + lastWeek : '[keçən həftə] dddd [saat] LT', | |
| 4023 | + sameElse : 'L' | |
| 4024 | + }, | |
| 4025 | + relativeTime : { | |
| 4026 | + future : '%s sonra', | |
| 4027 | + past : '%s əvvəl', | |
| 4028 | + s : 'birneçə saniyyə', | |
| 4029 | + m : 'bir dəqiqə', | |
| 4030 | + mm : '%d dəqiqə', | |
| 4031 | + h : 'bir saat', | |
| 4032 | + hh : '%d saat', | |
| 4033 | + d : 'bir gün', | |
| 4034 | + dd : '%d gün', | |
| 4035 | + M : 'bir ay', | |
| 4036 | + MM : '%d ay', | |
| 4037 | + y : 'bir il', | |
| 4038 | + yy : '%d il' | |
| 4039 | + }, | |
| 4040 | + meridiemParse: /gecə|səhər|gündüz|axşam/, | |
| 4041 | + isPM : function (input) { | |
| 4042 | + return /^(gündüz|axşam)$/.test(input); | |
| 4043 | + }, | |
| 4044 | + meridiem : function (hour, minute, isLower) { | |
| 4045 | + if (hour < 4) { | |
| 4046 | + return 'gecə'; | |
| 4047 | + } else if (hour < 12) { | |
| 4048 | + return 'səhər'; | |
| 4049 | + } else if (hour < 17) { | |
| 4050 | + return 'gündüz'; | |
| 4051 | + } else { | |
| 4052 | + return 'axşam'; | |
| 4053 | + } | |
| 4054 | + }, | |
| 4055 | + ordinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, | |
| 4056 | + ordinal : function (number) { | |
| 4057 | + if (number === 0) { // special case for zero | |
| 4058 | + return number + '-ıncı'; | |
| 4059 | + } | |
| 4060 | + var a = number % 10, | |
| 4061 | + b = number % 100 - a, | |
| 4062 | + c = number >= 100 ? 100 : null; | |
| 4063 | + return number + (az__suffixes[a] || az__suffixes[b] || az__suffixes[c]); | |
| 4064 | + }, | |
| 4065 | + week : { | |
| 4066 | + dow : 1, // Monday is the first day of the week. | |
| 4067 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 4068 | + } | |
| 4069 | + }); | |
| 4070 | + | |
| 4071 | + //! moment.js locale configuration | |
| 4072 | + //! locale : belarusian (be) | |
| 4073 | + //! author : Dmitry Demidov : https://github.com/demidov91 | |
| 4074 | + //! author: Praleska: http://praleska.pro/ | |
| 4075 | + //! Author : Menelion Elensúle : https://github.com/Oire | |
| 4076 | + | |
| 4077 | + function be__plural(word, num) { | |
| 4078 | + var forms = word.split('_'); | |
| 4079 | + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); | |
| 4080 | + } | |
| 4081 | + function be__relativeTimeWithPlural(number, withoutSuffix, key) { | |
| 4082 | + var format = { | |
| 4083 | + 'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', | |
| 4084 | + 'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', | |
| 4085 | + 'dd': 'дзень_дні_дзён', | |
| 4086 | + 'MM': 'месяц_месяцы_месяцаў', | |
| 4087 | + 'yy': 'год_гады_гадоў' | |
| 4088 | + }; | |
| 4089 | + if (key === 'm') { | |
| 4090 | + return withoutSuffix ? 'хвіліна' : 'хвіліну'; | |
| 4091 | + } | |
| 4092 | + else if (key === 'h') { | |
| 4093 | + return withoutSuffix ? 'гадзіна' : 'гадзіну'; | |
| 4094 | + } | |
| 4095 | + else { | |
| 4096 | + return number + ' ' + be__plural(format[key], +number); | |
| 4097 | + } | |
| 4098 | + } | |
| 4099 | + | |
| 4100 | + var be = moment__default.defineLocale('be', { | |
| 4101 | + months : { | |
| 4102 | + format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'), | |
| 4103 | + standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_') | |
| 4104 | + }, | |
| 4105 | + monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'), | |
| 4106 | + weekdays : { | |
| 4107 | + format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), | |
| 4108 | + standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), | |
| 4109 | + isFormat: /\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/ | |
| 4110 | + }, | |
| 4111 | + weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), | |
| 4112 | + weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), | |
| 4113 | + longDateFormat : { | |
| 4114 | + LT : 'HH:mm', | |
| 4115 | + LTS : 'HH:mm:ss', | |
| 4116 | + L : 'DD.MM.YYYY', | |
| 4117 | + LL : 'D MMMM YYYY г.', | |
| 4118 | + LLL : 'D MMMM YYYY г., HH:mm', | |
| 4119 | + LLLL : 'dddd, D MMMM YYYY г., HH:mm' | |
| 4120 | + }, | |
| 4121 | + calendar : { | |
| 4122 | + sameDay: '[Сёння ў] LT', | |
| 4123 | + nextDay: '[Заўтра ў] LT', | |
| 4124 | + lastDay: '[Учора ў] LT', | |
| 4125 | + nextWeek: function () { | |
| 4126 | + return '[У] dddd [ў] LT'; | |
| 4127 | + }, | |
| 4128 | + lastWeek: function () { | |
| 4129 | + switch (this.day()) { | |
| 4130 | + case 0: | |
| 4131 | + case 3: | |
| 4132 | + case 5: | |
| 4133 | + case 6: | |
| 4134 | + return '[У мінулую] dddd [ў] LT'; | |
| 4135 | + case 1: | |
| 4136 | + case 2: | |
| 4137 | + case 4: | |
| 4138 | + return '[У мінулы] dddd [ў] LT'; | |
| 4139 | + } | |
| 4140 | + }, | |
| 4141 | + sameElse: 'L' | |
| 4142 | + }, | |
| 4143 | + relativeTime : { | |
| 4144 | + future : 'праз %s', | |
| 4145 | + past : '%s таму', | |
| 4146 | + s : 'некалькі секунд', | |
| 4147 | + m : be__relativeTimeWithPlural, | |
| 4148 | + mm : be__relativeTimeWithPlural, | |
| 4149 | + h : be__relativeTimeWithPlural, | |
| 4150 | + hh : be__relativeTimeWithPlural, | |
| 4151 | + d : 'дзень', | |
| 4152 | + dd : be__relativeTimeWithPlural, | |
| 4153 | + M : 'месяц', | |
| 4154 | + MM : be__relativeTimeWithPlural, | |
| 4155 | + y : 'год', | |
| 4156 | + yy : be__relativeTimeWithPlural | |
| 4157 | + }, | |
| 4158 | + meridiemParse: /ночы|раніцы|дня|вечара/, | |
| 4159 | + isPM : function (input) { | |
| 4160 | + return /^(дня|вечара)$/.test(input); | |
| 4161 | + }, | |
| 4162 | + meridiem : function (hour, minute, isLower) { | |
| 4163 | + if (hour < 4) { | |
| 4164 | + return 'ночы'; | |
| 4165 | + } else if (hour < 12) { | |
| 4166 | + return 'раніцы'; | |
| 4167 | + } else if (hour < 17) { | |
| 4168 | + return 'дня'; | |
| 4169 | + } else { | |
| 4170 | + return 'вечара'; | |
| 4171 | + } | |
| 4172 | + }, | |
| 4173 | + ordinalParse: /\d{1,2}-(і|ы|га)/, | |
| 4174 | + ordinal: function (number, period) { | |
| 4175 | + switch (period) { | |
| 4176 | + case 'M': | |
| 4177 | + case 'd': | |
| 4178 | + case 'DDD': | |
| 4179 | + case 'w': | |
| 4180 | + case 'W': | |
| 4181 | + return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы'; | |
| 4182 | + case 'D': | |
| 4183 | + return number + '-га'; | |
| 4184 | + default: | |
| 4185 | + return number; | |
| 4186 | + } | |
| 4187 | + }, | |
| 4188 | + week : { | |
| 4189 | + dow : 1, // Monday is the first day of the week. | |
| 4190 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 4191 | + } | |
| 4192 | + }); | |
| 4193 | + | |
| 4194 | + //! moment.js locale configuration | |
| 4195 | + //! locale : bulgarian (bg) | |
| 4196 | + //! author : Krasen Borisov : https://github.com/kraz | |
| 4197 | + | |
| 4198 | + var bg = moment__default.defineLocale('bg', { | |
| 4199 | + months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'), | |
| 4200 | + monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), | |
| 4201 | + weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'), | |
| 4202 | + weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'), | |
| 4203 | + weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), | |
| 4204 | + longDateFormat : { | |
| 4205 | + LT : 'H:mm', | |
| 4206 | + LTS : 'H:mm:ss', | |
| 4207 | + L : 'D.MM.YYYY', | |
| 4208 | + LL : 'D MMMM YYYY', | |
| 4209 | + LLL : 'D MMMM YYYY H:mm', | |
| 4210 | + LLLL : 'dddd, D MMMM YYYY H:mm' | |
| 4211 | + }, | |
| 4212 | + calendar : { | |
| 4213 | + sameDay : '[Днес в] LT', | |
| 4214 | + nextDay : '[Утре в] LT', | |
| 4215 | + nextWeek : 'dddd [в] LT', | |
| 4216 | + lastDay : '[Вчера в] LT', | |
| 4217 | + lastWeek : function () { | |
| 4218 | + switch (this.day()) { | |
| 4219 | + case 0: | |
| 4220 | + case 3: | |
| 4221 | + case 6: | |
| 4222 | + return '[В изминалата] dddd [в] LT'; | |
| 4223 | + case 1: | |
| 4224 | + case 2: | |
| 4225 | + case 4: | |
| 4226 | + case 5: | |
| 4227 | + return '[В изминалия] dddd [в] LT'; | |
| 4228 | + } | |
| 4229 | + }, | |
| 4230 | + sameElse : 'L' | |
| 4231 | + }, | |
| 4232 | + relativeTime : { | |
| 4233 | + future : 'след %s', | |
| 4234 | + past : 'преди %s', | |
| 4235 | + s : 'няколко секунди', | |
| 4236 | + m : 'минута', | |
| 4237 | + mm : '%d минути', | |
| 4238 | + h : 'час', | |
| 4239 | + hh : '%d часа', | |
| 4240 | + d : 'ден', | |
| 4241 | + dd : '%d дни', | |
| 4242 | + M : 'месец', | |
| 4243 | + MM : '%d месеца', | |
| 4244 | + y : 'година', | |
| 4245 | + yy : '%d години' | |
| 4246 | + }, | |
| 4247 | + ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, | |
| 4248 | + ordinal : function (number) { | |
| 4249 | + var lastDigit = number % 10, | |
| 4250 | + last2Digits = number % 100; | |
| 4251 | + if (number === 0) { | |
| 4252 | + return number + '-ев'; | |
| 4253 | + } else if (last2Digits === 0) { | |
| 4254 | + return number + '-ен'; | |
| 4255 | + } else if (last2Digits > 10 && last2Digits < 20) { | |
| 4256 | + return number + '-ти'; | |
| 4257 | + } else if (lastDigit === 1) { | |
| 4258 | + return number + '-ви'; | |
| 4259 | + } else if (lastDigit === 2) { | |
| 4260 | + return number + '-ри'; | |
| 4261 | + } else if (lastDigit === 7 || lastDigit === 8) { | |
| 4262 | + return number + '-ми'; | |
| 4263 | + } else { | |
| 4264 | + return number + '-ти'; | |
| 4265 | + } | |
| 4266 | + }, | |
| 4267 | + week : { | |
| 4268 | + dow : 1, // Monday is the first day of the week. | |
| 4269 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 4270 | + } | |
| 4271 | + }); | |
| 4272 | + | |
| 4273 | + //! moment.js locale configuration | |
| 4274 | + //! locale : Bengali (bn) | |
| 4275 | + //! author : Kaushik Gandhi : https://github.com/kaushikgandhi | |
| 4276 | + | |
| 4277 | + var bn__symbolMap = { | |
| 4278 | + '1': '১', | |
| 4279 | + '2': '২', | |
| 4280 | + '3': '৩', | |
| 4281 | + '4': '৪', | |
| 4282 | + '5': '৫', | |
| 4283 | + '6': '৬', | |
| 4284 | + '7': '৭', | |
| 4285 | + '8': '৮', | |
| 4286 | + '9': '৯', | |
| 4287 | + '0': '০' | |
| 4288 | + }, | |
| 4289 | + bn__numberMap = { | |
| 4290 | + '১': '1', | |
| 4291 | + '২': '2', | |
| 4292 | + '৩': '3', | |
| 4293 | + '৪': '4', | |
| 4294 | + '৫': '5', | |
| 4295 | + '৬': '6', | |
| 4296 | + '৭': '7', | |
| 4297 | + '৮': '8', | |
| 4298 | + '৯': '9', | |
| 4299 | + '০': '0' | |
| 4300 | + }; | |
| 4301 | + | |
| 4302 | + var bn = moment__default.defineLocale('bn', { | |
| 4303 | + months : 'জানুয়ারী_ফেবুয়ারী_মার্চ_এপ্রিল_মে_জুন_জুলাই_অগাস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'), | |
| 4304 | + monthsShort : 'জানু_ফেব_মার্চ_এপর_মে_জুন_জুল_অগ_সেপ্ট_অক্টো_নভ_ডিসেম্'.split('_'), | |
| 4305 | + weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পত্তিবার_শুক্রবার_শনিবার'.split('_'), | |
| 4306 | + weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পত্তি_শুক্র_শনি'.split('_'), | |
| 4307 | + weekdaysMin : 'রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি'.split('_'), | |
| 4308 | + longDateFormat : { | |
| 4309 | + LT : 'A h:mm সময়', | |
| 4310 | + LTS : 'A h:mm:ss সময়', | |
| 4311 | + L : 'DD/MM/YYYY', | |
| 4312 | + LL : 'D MMMM YYYY', | |
| 4313 | + LLL : 'D MMMM YYYY, A h:mm সময়', | |
| 4314 | + LLLL : 'dddd, D MMMM YYYY, A h:mm সময়' | |
| 4315 | + }, | |
| 4316 | + calendar : { | |
| 4317 | + sameDay : '[আজ] LT', | |
| 4318 | + nextDay : '[আগামীকাল] LT', | |
| 4319 | + nextWeek : 'dddd, LT', | |
| 4320 | + lastDay : '[গতকাল] LT', | |
| 4321 | + lastWeek : '[গত] dddd, LT', | |
| 4322 | + sameElse : 'L' | |
| 4323 | + }, | |
| 4324 | + relativeTime : { | |
| 4325 | + future : '%s পরে', | |
| 4326 | + past : '%s আগে', | |
| 4327 | + s : 'কয়েক সেকেন্ড', | |
| 4328 | + m : 'এক মিনিট', | |
| 4329 | + mm : '%d মিনিট', | |
| 4330 | + h : 'এক ঘন্টা', | |
| 4331 | + hh : '%d ঘন্টা', | |
| 4332 | + d : 'এক দিন', | |
| 4333 | + dd : '%d দিন', | |
| 4334 | + M : 'এক মাস', | |
| 4335 | + MM : '%d মাস', | |
| 4336 | + y : 'এক বছর', | |
| 4337 | + yy : '%d বছর' | |
| 4338 | + }, | |
| 4339 | + preparse: function (string) { | |
| 4340 | + return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { | |
| 4341 | + return bn__numberMap[match]; | |
| 4342 | + }); | |
| 4343 | + }, | |
| 4344 | + postformat: function (string) { | |
| 4345 | + return string.replace(/\d/g, function (match) { | |
| 4346 | + return bn__symbolMap[match]; | |
| 4347 | + }); | |
| 4348 | + }, | |
| 4349 | + meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, | |
| 4350 | + isPM: function (input) { | |
| 4351 | + return /^(দুপুর|বিকাল|রাত)$/.test(input); | |
| 4352 | + }, | |
| 4353 | + //Bengali is a vast language its spoken | |
| 4354 | + //in different forms in various parts of the world. | |
| 4355 | + //I have just generalized with most common one used | |
| 4356 | + meridiem : function (hour, minute, isLower) { | |
| 4357 | + if (hour < 4) { | |
| 4358 | + return 'রাত'; | |
| 4359 | + } else if (hour < 10) { | |
| 4360 | + return 'সকাল'; | |
| 4361 | + } else if (hour < 17) { | |
| 4362 | + return 'দুপুর'; | |
| 4363 | + } else if (hour < 20) { | |
| 4364 | + return 'বিকাল'; | |
| 4365 | + } else { | |
| 4366 | + return 'রাত'; | |
| 4367 | + } | |
| 4368 | + }, | |
| 4369 | + week : { | |
| 4370 | + dow : 0, // Sunday is the first day of the week. | |
| 4371 | + doy : 6 // The week that contains Jan 1st is the first week of the year. | |
| 4372 | + } | |
| 4373 | + }); | |
| 4374 | + | |
| 4375 | + //! moment.js locale configuration | |
| 4376 | + //! locale : tibetan (bo) | |
| 4377 | + //! author : Thupten N. Chakrishar : https://github.com/vajradog | |
| 4378 | + | |
| 4379 | + var bo__symbolMap = { | |
| 4380 | + '1': '༡', | |
| 4381 | + '2': '༢', | |
| 4382 | + '3': '༣', | |
| 4383 | + '4': '༤', | |
| 4384 | + '5': '༥', | |
| 4385 | + '6': '༦', | |
| 4386 | + '7': '༧', | |
| 4387 | + '8': '༨', | |
| 4388 | + '9': '༩', | |
| 4389 | + '0': '༠' | |
| 4390 | + }, | |
| 4391 | + bo__numberMap = { | |
| 4392 | + '༡': '1', | |
| 4393 | + '༢': '2', | |
| 4394 | + '༣': '3', | |
| 4395 | + '༤': '4', | |
| 4396 | + '༥': '5', | |
| 4397 | + '༦': '6', | |
| 4398 | + '༧': '7', | |
| 4399 | + '༨': '8', | |
| 4400 | + '༩': '9', | |
| 4401 | + '༠': '0' | |
| 4402 | + }; | |
| 4403 | + | |
| 4404 | + var bo = moment__default.defineLocale('bo', { | |
| 4405 | + months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), | |
| 4406 | + monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), | |
| 4407 | + weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'), | |
| 4408 | + weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), | |
| 4409 | + weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), | |
| 4410 | + longDateFormat : { | |
| 4411 | + LT : 'A h:mm', | |
| 4412 | + LTS : 'A h:mm:ss', | |
| 4413 | + L : 'DD/MM/YYYY', | |
| 4414 | + LL : 'D MMMM YYYY', | |
| 4415 | + LLL : 'D MMMM YYYY, A h:mm', | |
| 4416 | + LLLL : 'dddd, D MMMM YYYY, A h:mm' | |
| 4417 | + }, | |
| 4418 | + calendar : { | |
| 4419 | + sameDay : '[དི་རིང] LT', | |
| 4420 | + nextDay : '[སང་ཉིན] LT', | |
| 4421 | + nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT', | |
| 4422 | + lastDay : '[ཁ་སང] LT', | |
| 4423 | + lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', | |
| 4424 | + sameElse : 'L' | |
| 4425 | + }, | |
| 4426 | + relativeTime : { | |
| 4427 | + future : '%s ལ་', | |
| 4428 | + past : '%s སྔན་ལ', | |
| 4429 | + s : 'ལམ་སང', | |
| 4430 | + m : 'སྐར་མ་གཅིག', | |
| 4431 | + mm : '%d སྐར་མ', | |
| 4432 | + h : 'ཆུ་ཚོད་གཅིག', | |
| 4433 | + hh : '%d ཆུ་ཚོད', | |
| 4434 | + d : 'ཉིན་གཅིག', | |
| 4435 | + dd : '%d ཉིན་', | |
| 4436 | + M : 'ཟླ་བ་གཅིག', | |
| 4437 | + MM : '%d ཟླ་བ', | |
| 4438 | + y : 'ལོ་གཅིག', | |
| 4439 | + yy : '%d ལོ' | |
| 4440 | + }, | |
| 4441 | + preparse: function (string) { | |
| 4442 | + return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { | |
| 4443 | + return bo__numberMap[match]; | |
| 4444 | + }); | |
| 4445 | + }, | |
| 4446 | + postformat: function (string) { | |
| 4447 | + return string.replace(/\d/g, function (match) { | |
| 4448 | + return bo__symbolMap[match]; | |
| 4449 | + }); | |
| 4450 | + }, | |
| 4451 | + meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/, | |
| 4452 | + isPM: function (input) { | |
| 4453 | + return /^(ཉིན་གུང|དགོང་དག|མཚན་མོ)$/.test(input); | |
| 4454 | + }, | |
| 4455 | + meridiem : function (hour, minute, isLower) { | |
| 4456 | + if (hour < 4) { | |
| 4457 | + return 'མཚན་མོ'; | |
| 4458 | + } else if (hour < 10) { | |
| 4459 | + return 'ཞོགས་ཀས'; | |
| 4460 | + } else if (hour < 17) { | |
| 4461 | + return 'ཉིན་གུང'; | |
| 4462 | + } else if (hour < 20) { | |
| 4463 | + return 'དགོང་དག'; | |
| 4464 | + } else { | |
| 4465 | + return 'མཚན་མོ'; | |
| 4466 | + } | |
| 4467 | + }, | |
| 4468 | + week : { | |
| 4469 | + dow : 0, // Sunday is the first day of the week. | |
| 4470 | + doy : 6 // The week that contains Jan 1st is the first week of the year. | |
| 4471 | + } | |
| 4472 | + }); | |
| 4473 | + | |
| 4474 | + //! moment.js locale configuration | |
| 4475 | + //! locale : breton (br) | |
| 4476 | + //! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou | |
| 4477 | + | |
| 4478 | + function relativeTimeWithMutation(number, withoutSuffix, key) { | |
| 4479 | + var format = { | |
| 4480 | + 'mm': 'munutenn', | |
| 4481 | + 'MM': 'miz', | |
| 4482 | + 'dd': 'devezh' | |
| 4483 | + }; | |
| 4484 | + return number + ' ' + mutation(format[key], number); | |
| 4485 | + } | |
| 4486 | + function specialMutationForYears(number) { | |
| 4487 | + switch (lastNumber(number)) { | |
| 4488 | + case 1: | |
| 4489 | + case 3: | |
| 4490 | + case 4: | |
| 4491 | + case 5: | |
| 4492 | + case 9: | |
| 4493 | + return number + ' bloaz'; | |
| 4494 | + default: | |
| 4495 | + return number + ' vloaz'; | |
| 4496 | + } | |
| 4497 | + } | |
| 4498 | + function lastNumber(number) { | |
| 4499 | + if (number > 9) { | |
| 4500 | + return lastNumber(number % 10); | |
| 4501 | + } | |
| 4502 | + return number; | |
| 4503 | + } | |
| 4504 | + function mutation(text, number) { | |
| 4505 | + if (number === 2) { | |
| 4506 | + return softMutation(text); | |
| 4507 | + } | |
| 4508 | + return text; | |
| 4509 | + } | |
| 4510 | + function softMutation(text) { | |
| 4511 | + var mutationTable = { | |
| 4512 | + 'm': 'v', | |
| 4513 | + 'b': 'v', | |
| 4514 | + 'd': 'z' | |
| 4515 | + }; | |
| 4516 | + if (mutationTable[text.charAt(0)] === undefined) { | |
| 4517 | + return text; | |
| 4518 | + } | |
| 4519 | + return mutationTable[text.charAt(0)] + text.substring(1); | |
| 4520 | + } | |
| 4521 | + | |
| 4522 | + var br = moment__default.defineLocale('br', { | |
| 4523 | + months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'), | |
| 4524 | + monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), | |
| 4525 | + weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'), | |
| 4526 | + weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), | |
| 4527 | + weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), | |
| 4528 | + longDateFormat : { | |
| 4529 | + LT : 'h[e]mm A', | |
| 4530 | + LTS : 'h[e]mm:ss A', | |
| 4531 | + L : 'DD/MM/YYYY', | |
| 4532 | + LL : 'D [a viz] MMMM YYYY', | |
| 4533 | + LLL : 'D [a viz] MMMM YYYY h[e]mm A', | |
| 4534 | + LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A' | |
| 4535 | + }, | |
| 4536 | + calendar : { | |
| 4537 | + sameDay : '[Hiziv da] LT', | |
| 4538 | + nextDay : '[Warc\'hoazh da] LT', | |
| 4539 | + nextWeek : 'dddd [da] LT', | |
| 4540 | + lastDay : '[Dec\'h da] LT', | |
| 4541 | + lastWeek : 'dddd [paset da] LT', | |
| 4542 | + sameElse : 'L' | |
| 4543 | + }, | |
| 4544 | + relativeTime : { | |
| 4545 | + future : 'a-benn %s', | |
| 4546 | + past : '%s \'zo', | |
| 4547 | + s : 'un nebeud segondennoù', | |
| 4548 | + m : 'ur vunutenn', | |
| 4549 | + mm : relativeTimeWithMutation, | |
| 4550 | + h : 'un eur', | |
| 4551 | + hh : '%d eur', | |
| 4552 | + d : 'un devezh', | |
| 4553 | + dd : relativeTimeWithMutation, | |
| 4554 | + M : 'ur miz', | |
| 4555 | + MM : relativeTimeWithMutation, | |
| 4556 | + y : 'ur bloaz', | |
| 4557 | + yy : specialMutationForYears | |
| 4558 | + }, | |
| 4559 | + ordinalParse: /\d{1,2}(añ|vet)/, | |
| 4560 | + ordinal : function (number) { | |
| 4561 | + var output = (number === 1) ? 'añ' : 'vet'; | |
| 4562 | + return number + output; | |
| 4563 | + }, | |
| 4564 | + week : { | |
| 4565 | + dow : 1, // Monday is the first day of the week. | |
| 4566 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 4567 | + } | |
| 4568 | + }); | |
| 4569 | + | |
| 4570 | + //! moment.js locale configuration | |
| 4571 | + //! locale : bosnian (bs) | |
| 4572 | + //! author : Nedim Cholich : https://github.com/frontyard | |
| 4573 | + //! based on (hr) translation by Bojan Marković | |
| 4574 | + | |
| 4575 | + function bs__translate(number, withoutSuffix, key) { | |
| 4576 | + var result = number + ' '; | |
| 4577 | + switch (key) { | |
| 4578 | + case 'm': | |
| 4579 | + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; | |
| 4580 | + case 'mm': | |
| 4581 | + if (number === 1) { | |
| 4582 | + result += 'minuta'; | |
| 4583 | + } else if (number === 2 || number === 3 || number === 4) { | |
| 4584 | + result += 'minute'; | |
| 4585 | + } else { | |
| 4586 | + result += 'minuta'; | |
| 4587 | + } | |
| 4588 | + return result; | |
| 4589 | + case 'h': | |
| 4590 | + return withoutSuffix ? 'jedan sat' : 'jednog sata'; | |
| 4591 | + case 'hh': | |
| 4592 | + if (number === 1) { | |
| 4593 | + result += 'sat'; | |
| 4594 | + } else if (number === 2 || number === 3 || number === 4) { | |
| 4595 | + result += 'sata'; | |
| 4596 | + } else { | |
| 4597 | + result += 'sati'; | |
| 4598 | + } | |
| 4599 | + return result; | |
| 4600 | + case 'dd': | |
| 4601 | + if (number === 1) { | |
| 4602 | + result += 'dan'; | |
| 4603 | + } else { | |
| 4604 | + result += 'dana'; | |
| 4605 | + } | |
| 4606 | + return result; | |
| 4607 | + case 'MM': | |
| 4608 | + if (number === 1) { | |
| 4609 | + result += 'mjesec'; | |
| 4610 | + } else if (number === 2 || number === 3 || number === 4) { | |
| 4611 | + result += 'mjeseca'; | |
| 4612 | + } else { | |
| 4613 | + result += 'mjeseci'; | |
| 4614 | + } | |
| 4615 | + return result; | |
| 4616 | + case 'yy': | |
| 4617 | + if (number === 1) { | |
| 4618 | + result += 'godina'; | |
| 4619 | + } else if (number === 2 || number === 3 || number === 4) { | |
| 4620 | + result += 'godine'; | |
| 4621 | + } else { | |
| 4622 | + result += 'godina'; | |
| 4623 | + } | |
| 4624 | + return result; | |
| 4625 | + } | |
| 4626 | + } | |
| 4627 | + | |
| 4628 | + var bs = moment__default.defineLocale('bs', { | |
| 4629 | + months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'), | |
| 4630 | + monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'), | |
| 4631 | + weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), | |
| 4632 | + weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), | |
| 4633 | + weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), | |
| 4634 | + longDateFormat : { | |
| 4635 | + LT : 'H:mm', | |
| 4636 | + LTS : 'H:mm:ss', | |
| 4637 | + L : 'DD. MM. YYYY', | |
| 4638 | + LL : 'D. MMMM YYYY', | |
| 4639 | + LLL : 'D. MMMM YYYY H:mm', | |
| 4640 | + LLLL : 'dddd, D. MMMM YYYY H:mm' | |
| 4641 | + }, | |
| 4642 | + calendar : { | |
| 4643 | + sameDay : '[danas u] LT', | |
| 4644 | + nextDay : '[sutra u] LT', | |
| 4645 | + nextWeek : function () { | |
| 4646 | + switch (this.day()) { | |
| 4647 | + case 0: | |
| 4648 | + return '[u] [nedjelju] [u] LT'; | |
| 4649 | + case 3: | |
| 4650 | + return '[u] [srijedu] [u] LT'; | |
| 4651 | + case 6: | |
| 4652 | + return '[u] [subotu] [u] LT'; | |
| 4653 | + case 1: | |
| 4654 | + case 2: | |
| 4655 | + case 4: | |
| 4656 | + case 5: | |
| 4657 | + return '[u] dddd [u] LT'; | |
| 4658 | + } | |
| 4659 | + }, | |
| 4660 | + lastDay : '[jučer u] LT', | |
| 4661 | + lastWeek : function () { | |
| 4662 | + switch (this.day()) { | |
| 4663 | + case 0: | |
| 4664 | + case 3: | |
| 4665 | + return '[prošlu] dddd [u] LT'; | |
| 4666 | + case 6: | |
| 4667 | + return '[prošle] [subote] [u] LT'; | |
| 4668 | + case 1: | |
| 4669 | + case 2: | |
| 4670 | + case 4: | |
| 4671 | + case 5: | |
| 4672 | + return '[prošli] dddd [u] LT'; | |
| 4673 | + } | |
| 4674 | + }, | |
| 4675 | + sameElse : 'L' | |
| 4676 | + }, | |
| 4677 | + relativeTime : { | |
| 4678 | + future : 'za %s', | |
| 4679 | + past : 'prije %s', | |
| 4680 | + s : 'par sekundi', | |
| 4681 | + m : bs__translate, | |
| 4682 | + mm : bs__translate, | |
| 4683 | + h : bs__translate, | |
| 4684 | + hh : bs__translate, | |
| 4685 | + d : 'dan', | |
| 4686 | + dd : bs__translate, | |
| 4687 | + M : 'mjesec', | |
| 4688 | + MM : bs__translate, | |
| 4689 | + y : 'godinu', | |
| 4690 | + yy : bs__translate | |
| 4691 | + }, | |
| 4692 | + ordinalParse: /\d{1,2}\./, | |
| 4693 | + ordinal : '%d.', | |
| 4694 | + week : { | |
| 4695 | + dow : 1, // Monday is the first day of the week. | |
| 4696 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 4697 | + } | |
| 4698 | + }); | |
| 4699 | + | |
| 4700 | + //! moment.js locale configuration | |
| 4701 | + //! locale : catalan (ca) | |
| 4702 | + //! author : Juan G. Hurtado : https://github.com/juanghurtado | |
| 4703 | + | |
| 4704 | + var ca = moment__default.defineLocale('ca', { | |
| 4705 | + months : 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'), | |
| 4706 | + monthsShort : 'gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.'.split('_'), | |
| 4707 | + weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'), | |
| 4708 | + weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), | |
| 4709 | + weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'), | |
| 4710 | + longDateFormat : { | |
| 4711 | + LT : 'H:mm', | |
| 4712 | + LTS : 'H:mm:ss', | |
| 4713 | + L : 'DD/MM/YYYY', | |
| 4714 | + LL : 'D MMMM YYYY', | |
| 4715 | + LLL : 'D MMMM YYYY H:mm', | |
| 4716 | + LLLL : 'dddd D MMMM YYYY H:mm' | |
| 4717 | + }, | |
| 4718 | + calendar : { | |
| 4719 | + sameDay : function () { | |
| 4720 | + return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; | |
| 4721 | + }, | |
| 4722 | + nextDay : function () { | |
| 4723 | + return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; | |
| 4724 | + }, | |
| 4725 | + nextWeek : function () { | |
| 4726 | + return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; | |
| 4727 | + }, | |
| 4728 | + lastDay : function () { | |
| 4729 | + return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; | |
| 4730 | + }, | |
| 4731 | + lastWeek : function () { | |
| 4732 | + return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; | |
| 4733 | + }, | |
| 4734 | + sameElse : 'L' | |
| 4735 | + }, | |
| 4736 | + relativeTime : { | |
| 4737 | + future : 'en %s', | |
| 4738 | + past : 'fa %s', | |
| 4739 | + s : 'uns segons', | |
| 4740 | + m : 'un minut', | |
| 4741 | + mm : '%d minuts', | |
| 4742 | + h : 'una hora', | |
| 4743 | + hh : '%d hores', | |
| 4744 | + d : 'un dia', | |
| 4745 | + dd : '%d dies', | |
| 4746 | + M : 'un mes', | |
| 4747 | + MM : '%d mesos', | |
| 4748 | + y : 'un any', | |
| 4749 | + yy : '%d anys' | |
| 4750 | + }, | |
| 4751 | + ordinalParse: /\d{1,2}(r|n|t|è|a)/, | |
| 4752 | + ordinal : function (number, period) { | |
| 4753 | + var output = (number === 1) ? 'r' : | |
| 4754 | + (number === 2) ? 'n' : | |
| 4755 | + (number === 3) ? 'r' : | |
| 4756 | + (number === 4) ? 't' : 'è'; | |
| 4757 | + if (period === 'w' || period === 'W') { | |
| 4758 | + output = 'a'; | |
| 4759 | + } | |
| 4760 | + return number + output; | |
| 4761 | + }, | |
| 4762 | + week : { | |
| 4763 | + dow : 1, // Monday is the first day of the week. | |
| 4764 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 4765 | + } | |
| 4766 | + }); | |
| 4767 | + | |
| 4768 | + //! moment.js locale configuration | |
| 4769 | + //! locale : czech (cs) | |
| 4770 | + //! author : petrbela : https://github.com/petrbela | |
| 4771 | + | |
| 4772 | + var cs__months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'), | |
| 4773 | + cs__monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'); | |
| 4774 | + function cs__plural(n) { | |
| 4775 | + return (n > 1) && (n < 5) && (~~(n / 10) !== 1); | |
| 4776 | + } | |
| 4777 | + function cs__translate(number, withoutSuffix, key, isFuture) { | |
| 4778 | + var result = number + ' '; | |
| 4779 | + switch (key) { | |
| 4780 | + case 's': // a few seconds / in a few seconds / a few seconds ago | |
| 4781 | + return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami'; | |
| 4782 | + case 'm': // a minute / in a minute / a minute ago | |
| 4783 | + return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou'); | |
| 4784 | + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago | |
| 4785 | + if (withoutSuffix || isFuture) { | |
| 4786 | + return result + (cs__plural(number) ? 'minuty' : 'minut'); | |
| 4787 | + } else { | |
| 4788 | + return result + 'minutami'; | |
| 4789 | + } | |
| 4790 | + break; | |
| 4791 | + case 'h': // an hour / in an hour / an hour ago | |
| 4792 | + return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); | |
| 4793 | + case 'hh': // 9 hours / in 9 hours / 9 hours ago | |
| 4794 | + if (withoutSuffix || isFuture) { | |
| 4795 | + return result + (cs__plural(number) ? 'hodiny' : 'hodin'); | |
| 4796 | + } else { | |
| 4797 | + return result + 'hodinami'; | |
| 4798 | + } | |
| 4799 | + break; | |
| 4800 | + case 'd': // a day / in a day / a day ago | |
| 4801 | + return (withoutSuffix || isFuture) ? 'den' : 'dnem'; | |
| 4802 | + case 'dd': // 9 days / in 9 days / 9 days ago | |
| 4803 | + if (withoutSuffix || isFuture) { | |
| 4804 | + return result + (cs__plural(number) ? 'dny' : 'dní'); | |
| 4805 | + } else { | |
| 4806 | + return result + 'dny'; | |
| 4807 | + } | |
| 4808 | + break; | |
| 4809 | + case 'M': // a month / in a month / a month ago | |
| 4810 | + return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem'; | |
| 4811 | + case 'MM': // 9 months / in 9 months / 9 months ago | |
| 4812 | + if (withoutSuffix || isFuture) { | |
| 4813 | + return result + (cs__plural(number) ? 'měsíce' : 'měsíců'); | |
| 4814 | + } else { | |
| 4815 | + return result + 'měsíci'; | |
| 4816 | + } | |
| 4817 | + break; | |
| 4818 | + case 'y': // a year / in a year / a year ago | |
| 4819 | + return (withoutSuffix || isFuture) ? 'rok' : 'rokem'; | |
| 4820 | + case 'yy': // 9 years / in 9 years / 9 years ago | |
| 4821 | + if (withoutSuffix || isFuture) { | |
| 4822 | + return result + (cs__plural(number) ? 'roky' : 'let'); | |
| 4823 | + } else { | |
| 4824 | + return result + 'lety'; | |
| 4825 | + } | |
| 4826 | + break; | |
| 4827 | + } | |
| 4828 | + } | |
| 4829 | + | |
| 4830 | + var cs = moment__default.defineLocale('cs', { | |
| 4831 | + months : cs__months, | |
| 4832 | + monthsShort : cs__monthsShort, | |
| 4833 | + monthsParse : (function (months, monthsShort) { | |
| 4834 | + var i, _monthsParse = []; | |
| 4835 | + for (i = 0; i < 12; i++) { | |
| 4836 | + // use custom parser to solve problem with July (červenec) | |
| 4837 | + _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i'); | |
| 4838 | + } | |
| 4839 | + return _monthsParse; | |
| 4840 | + }(cs__months, cs__monthsShort)), | |
| 4841 | + shortMonthsParse : (function (monthsShort) { | |
| 4842 | + var i, _shortMonthsParse = []; | |
| 4843 | + for (i = 0; i < 12; i++) { | |
| 4844 | + _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i'); | |
| 4845 | + } | |
| 4846 | + return _shortMonthsParse; | |
| 4847 | + }(cs__monthsShort)), | |
| 4848 | + longMonthsParse : (function (months) { | |
| 4849 | + var i, _longMonthsParse = []; | |
| 4850 | + for (i = 0; i < 12; i++) { | |
| 4851 | + _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i'); | |
| 4852 | + } | |
| 4853 | + return _longMonthsParse; | |
| 4854 | + }(cs__months)), | |
| 4855 | + weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), | |
| 4856 | + weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'), | |
| 4857 | + weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'), | |
| 4858 | + longDateFormat : { | |
| 4859 | + LT: 'H:mm', | |
| 4860 | + LTS : 'H:mm:ss', | |
| 4861 | + L : 'DD.MM.YYYY', | |
| 4862 | + LL : 'D. MMMM YYYY', | |
| 4863 | + LLL : 'D. MMMM YYYY H:mm', | |
| 4864 | + LLLL : 'dddd D. MMMM YYYY H:mm' | |
| 4865 | + }, | |
| 4866 | + calendar : { | |
| 4867 | + sameDay: '[dnes v] LT', | |
| 4868 | + nextDay: '[zítra v] LT', | |
| 4869 | + nextWeek: function () { | |
| 4870 | + switch (this.day()) { | |
| 4871 | + case 0: | |
| 4872 | + return '[v neděli v] LT'; | |
| 4873 | + case 1: | |
| 4874 | + case 2: | |
| 4875 | + return '[v] dddd [v] LT'; | |
| 4876 | + case 3: | |
| 4877 | + return '[ve středu v] LT'; | |
| 4878 | + case 4: | |
| 4879 | + return '[ve čtvrtek v] LT'; | |
| 4880 | + case 5: | |
| 4881 | + return '[v pátek v] LT'; | |
| 4882 | + case 6: | |
| 4883 | + return '[v sobotu v] LT'; | |
| 4884 | + } | |
| 4885 | + }, | |
| 4886 | + lastDay: '[včera v] LT', | |
| 4887 | + lastWeek: function () { | |
| 4888 | + switch (this.day()) { | |
| 4889 | + case 0: | |
| 4890 | + return '[minulou neděli v] LT'; | |
| 4891 | + case 1: | |
| 4892 | + case 2: | |
| 4893 | + return '[minulé] dddd [v] LT'; | |
| 4894 | + case 3: | |
| 4895 | + return '[minulou středu v] LT'; | |
| 4896 | + case 4: | |
| 4897 | + case 5: | |
| 4898 | + return '[minulý] dddd [v] LT'; | |
| 4899 | + case 6: | |
| 4900 | + return '[minulou sobotu v] LT'; | |
| 4901 | + } | |
| 4902 | + }, | |
| 4903 | + sameElse: 'L' | |
| 4904 | + }, | |
| 4905 | + relativeTime : { | |
| 4906 | + future : 'za %s', | |
| 4907 | + past : 'před %s', | |
| 4908 | + s : cs__translate, | |
| 4909 | + m : cs__translate, | |
| 4910 | + mm : cs__translate, | |
| 4911 | + h : cs__translate, | |
| 4912 | + hh : cs__translate, | |
| 4913 | + d : cs__translate, | |
| 4914 | + dd : cs__translate, | |
| 4915 | + M : cs__translate, | |
| 4916 | + MM : cs__translate, | |
| 4917 | + y : cs__translate, | |
| 4918 | + yy : cs__translate | |
| 4919 | + }, | |
| 4920 | + ordinalParse : /\d{1,2}\./, | |
| 4921 | + ordinal : '%d.', | |
| 4922 | + week : { | |
| 4923 | + dow : 1, // Monday is the first day of the week. | |
| 4924 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 4925 | + } | |
| 4926 | + }); | |
| 4927 | + | |
| 4928 | + //! moment.js locale configuration | |
| 4929 | + //! locale : chuvash (cv) | |
| 4930 | + //! author : Anatoly Mironov : https://github.com/mirontoli | |
| 4931 | + | |
| 4932 | + var cv = moment__default.defineLocale('cv', { | |
| 4933 | + months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'), | |
| 4934 | + monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), | |
| 4935 | + weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'), | |
| 4936 | + weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), | |
| 4937 | + weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), | |
| 4938 | + longDateFormat : { | |
| 4939 | + LT : 'HH:mm', | |
| 4940 | + LTS : 'HH:mm:ss', | |
| 4941 | + L : 'DD-MM-YYYY', | |
| 4942 | + LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', | |
| 4943 | + LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', | |
| 4944 | + LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm' | |
| 4945 | + }, | |
| 4946 | + calendar : { | |
| 4947 | + sameDay: '[Паян] LT [сехетре]', | |
| 4948 | + nextDay: '[Ыран] LT [сехетре]', | |
| 4949 | + lastDay: '[Ӗнер] LT [сехетре]', | |
| 4950 | + nextWeek: '[Ҫитес] dddd LT [сехетре]', | |
| 4951 | + lastWeek: '[Иртнӗ] dddd LT [сехетре]', | |
| 4952 | + sameElse: 'L' | |
| 4953 | + }, | |
| 4954 | + relativeTime : { | |
| 4955 | + future : function (output) { | |
| 4956 | + var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран'; | |
| 4957 | + return output + affix; | |
| 4958 | + }, | |
| 4959 | + past : '%s каялла', | |
| 4960 | + s : 'пӗр-ик ҫеккунт', | |
| 4961 | + m : 'пӗр минут', | |
| 4962 | + mm : '%d минут', | |
| 4963 | + h : 'пӗр сехет', | |
| 4964 | + hh : '%d сехет', | |
| 4965 | + d : 'пӗр кун', | |
| 4966 | + dd : '%d кун', | |
| 4967 | + M : 'пӗр уйӑх', | |
| 4968 | + MM : '%d уйӑх', | |
| 4969 | + y : 'пӗр ҫул', | |
| 4970 | + yy : '%d ҫул' | |
| 4971 | + }, | |
| 4972 | + ordinalParse: /\d{1,2}-мӗш/, | |
| 4973 | + ordinal : '%d-мӗш', | |
| 4974 | + week : { | |
| 4975 | + dow : 1, // Monday is the first day of the week. | |
| 4976 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 4977 | + } | |
| 4978 | + }); | |
| 4979 | + | |
| 4980 | + //! moment.js locale configuration | |
| 4981 | + //! locale : Welsh (cy) | |
| 4982 | + //! author : Robert Allen | |
| 4983 | + | |
| 4984 | + var cy = moment__default.defineLocale('cy', { | |
| 4985 | + months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'), | |
| 4986 | + monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'), | |
| 4987 | + weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'), | |
| 4988 | + weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), | |
| 4989 | + weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), | |
| 4990 | + // time formats are the same as en-gb | |
| 4991 | + longDateFormat: { | |
| 4992 | + LT: 'HH:mm', | |
| 4993 | + LTS : 'HH:mm:ss', | |
| 4994 | + L: 'DD/MM/YYYY', | |
| 4995 | + LL: 'D MMMM YYYY', | |
| 4996 | + LLL: 'D MMMM YYYY HH:mm', | |
| 4997 | + LLLL: 'dddd, D MMMM YYYY HH:mm' | |
| 4998 | + }, | |
| 4999 | + calendar: { | |
| 5000 | + sameDay: '[Heddiw am] LT', | |
| 5001 | + nextDay: '[Yfory am] LT', | |
| 5002 | + nextWeek: 'dddd [am] LT', | |
| 5003 | + lastDay: '[Ddoe am] LT', | |
| 5004 | + lastWeek: 'dddd [diwethaf am] LT', | |
| 5005 | + sameElse: 'L' | |
| 5006 | + }, | |
| 5007 | + relativeTime: { | |
| 5008 | + future: 'mewn %s', | |
| 5009 | + past: '%s yn ôl', | |
| 5010 | + s: 'ychydig eiliadau', | |
| 5011 | + m: 'munud', | |
| 5012 | + mm: '%d munud', | |
| 5013 | + h: 'awr', | |
| 5014 | + hh: '%d awr', | |
| 5015 | + d: 'diwrnod', | |
| 5016 | + dd: '%d diwrnod', | |
| 5017 | + M: 'mis', | |
| 5018 | + MM: '%d mis', | |
| 5019 | + y: 'blwyddyn', | |
| 5020 | + yy: '%d flynedd' | |
| 5021 | + }, | |
| 5022 | + ordinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, | |
| 5023 | + // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh | |
| 5024 | + ordinal: function (number) { | |
| 5025 | + var b = number, | |
| 5026 | + output = '', | |
| 5027 | + lookup = [ | |
| 5028 | + '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed | |
| 5029 | + 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed | |
| 5030 | + ]; | |
| 5031 | + if (b > 20) { | |
| 5032 | + if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { | |
| 5033 | + output = 'fed'; // not 30ain, 70ain or 90ain | |
| 5034 | + } else { | |
| 5035 | + output = 'ain'; | |
| 5036 | + } | |
| 5037 | + } else if (b > 0) { | |
| 5038 | + output = lookup[b]; | |
| 5039 | + } | |
| 5040 | + return number + output; | |
| 5041 | + }, | |
| 5042 | + week : { | |
| 5043 | + dow : 1, // Monday is the first day of the week. | |
| 5044 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 5045 | + } | |
| 5046 | + }); | |
| 5047 | + | |
| 5048 | + //! moment.js locale configuration | |
| 5049 | + //! locale : danish (da) | |
| 5050 | + //! author : Ulrik Nielsen : https://github.com/mrbase | |
| 5051 | + | |
| 5052 | + var da = moment__default.defineLocale('da', { | |
| 5053 | + months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'), | |
| 5054 | + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), | |
| 5055 | + weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), | |
| 5056 | + weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'), | |
| 5057 | + weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), | |
| 5058 | + longDateFormat : { | |
| 5059 | + LT : 'HH:mm', | |
| 5060 | + LTS : 'HH:mm:ss', | |
| 5061 | + L : 'DD/MM/YYYY', | |
| 5062 | + LL : 'D. MMMM YYYY', | |
| 5063 | + LLL : 'D. MMMM YYYY HH:mm', | |
| 5064 | + LLLL : 'dddd [d.] D. MMMM YYYY HH:mm' | |
| 5065 | + }, | |
| 5066 | + calendar : { | |
| 5067 | + sameDay : '[I dag kl.] LT', | |
| 5068 | + nextDay : '[I morgen kl.] LT', | |
| 5069 | + nextWeek : 'dddd [kl.] LT', | |
| 5070 | + lastDay : '[I går kl.] LT', | |
| 5071 | + lastWeek : '[sidste] dddd [kl] LT', | |
| 5072 | + sameElse : 'L' | |
| 5073 | + }, | |
| 5074 | + relativeTime : { | |
| 5075 | + future : 'om %s', | |
| 5076 | + past : '%s siden', | |
| 5077 | + s : 'få sekunder', | |
| 5078 | + m : 'et minut', | |
| 5079 | + mm : '%d minutter', | |
| 5080 | + h : 'en time', | |
| 5081 | + hh : '%d timer', | |
| 5082 | + d : 'en dag', | |
| 5083 | + dd : '%d dage', | |
| 5084 | + M : 'en måned', | |
| 5085 | + MM : '%d måneder', | |
| 5086 | + y : 'et år', | |
| 5087 | + yy : '%d år' | |
| 5088 | + }, | |
| 5089 | + ordinalParse: /\d{1,2}\./, | |
| 5090 | + ordinal : '%d.', | |
| 5091 | + week : { | |
| 5092 | + dow : 1, // Monday is the first day of the week. | |
| 5093 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 5094 | + } | |
| 5095 | + }); | |
| 5096 | + | |
| 5097 | + //! moment.js locale configuration | |
| 5098 | + //! locale : austrian german (de-at) | |
| 5099 | + //! author : lluchs : https://github.com/lluchs | |
| 5100 | + //! author: Menelion Elensúle: https://github.com/Oire | |
| 5101 | + //! author : Martin Groller : https://github.com/MadMG | |
| 5102 | + //! author : Mikolaj Dadela : https://github.com/mik01aj | |
| 5103 | + | |
| 5104 | + function de_at__processRelativeTime(number, withoutSuffix, key, isFuture) { | |
| 5105 | + var format = { | |
| 5106 | + 'm': ['eine Minute', 'einer Minute'], | |
| 5107 | + 'h': ['eine Stunde', 'einer Stunde'], | |
| 5108 | + 'd': ['ein Tag', 'einem Tag'], | |
| 5109 | + 'dd': [number + ' Tage', number + ' Tagen'], | |
| 5110 | + 'M': ['ein Monat', 'einem Monat'], | |
| 5111 | + 'MM': [number + ' Monate', number + ' Monaten'], | |
| 5112 | + 'y': ['ein Jahr', 'einem Jahr'], | |
| 5113 | + 'yy': [number + ' Jahre', number + ' Jahren'] | |
| 5114 | + }; | |
| 5115 | + return withoutSuffix ? format[key][0] : format[key][1]; | |
| 5116 | + } | |
| 5117 | + | |
| 5118 | + var de_at = moment__default.defineLocale('de-at', { | |
| 5119 | + months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), | |
| 5120 | + monthsShort : 'Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), | |
| 5121 | + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), | |
| 5122 | + weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), | |
| 5123 | + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), | |
| 5124 | + longDateFormat : { | |
| 5125 | + LT: 'HH:mm', | |
| 5126 | + LTS: 'HH:mm:ss', | |
| 5127 | + L : 'DD.MM.YYYY', | |
| 5128 | + LL : 'D. MMMM YYYY', | |
| 5129 | + LLL : 'D. MMMM YYYY HH:mm', | |
| 5130 | + LLLL : 'dddd, D. MMMM YYYY HH:mm' | |
| 5131 | + }, | |
| 5132 | + calendar : { | |
| 5133 | + sameDay: '[heute um] LT [Uhr]', | |
| 5134 | + sameElse: 'L', | |
| 5135 | + nextDay: '[morgen um] LT [Uhr]', | |
| 5136 | + nextWeek: 'dddd [um] LT [Uhr]', | |
| 5137 | + lastDay: '[gestern um] LT [Uhr]', | |
| 5138 | + lastWeek: '[letzten] dddd [um] LT [Uhr]' | |
| 5139 | + }, | |
| 5140 | + relativeTime : { | |
| 5141 | + future : 'in %s', | |
| 5142 | + past : 'vor %s', | |
| 5143 | + s : 'ein paar Sekunden', | |
| 5144 | + m : de_at__processRelativeTime, | |
| 5145 | + mm : '%d Minuten', | |
| 5146 | + h : de_at__processRelativeTime, | |
| 5147 | + hh : '%d Stunden', | |
| 5148 | + d : de_at__processRelativeTime, | |
| 5149 | + dd : de_at__processRelativeTime, | |
| 5150 | + M : de_at__processRelativeTime, | |
| 5151 | + MM : de_at__processRelativeTime, | |
| 5152 | + y : de_at__processRelativeTime, | |
| 5153 | + yy : de_at__processRelativeTime | |
| 5154 | + }, | |
| 5155 | + ordinalParse: /\d{1,2}\./, | |
| 5156 | + ordinal : '%d.', | |
| 5157 | + week : { | |
| 5158 | + dow : 1, // Monday is the first day of the week. | |
| 5159 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 5160 | + } | |
| 5161 | + }); | |
| 5162 | + | |
| 5163 | + //! moment.js locale configuration | |
| 5164 | + //! locale : german (de) | |
| 5165 | + //! author : lluchs : https://github.com/lluchs | |
| 5166 | + //! author: Menelion Elensúle: https://github.com/Oire | |
| 5167 | + //! author : Mikolaj Dadela : https://github.com/mik01aj | |
| 5168 | + | |
| 5169 | + function de__processRelativeTime(number, withoutSuffix, key, isFuture) { | |
| 5170 | + var format = { | |
| 5171 | + 'm': ['eine Minute', 'einer Minute'], | |
| 5172 | + 'h': ['eine Stunde', 'einer Stunde'], | |
| 5173 | + 'd': ['ein Tag', 'einem Tag'], | |
| 5174 | + 'dd': [number + ' Tage', number + ' Tagen'], | |
| 5175 | + 'M': ['ein Monat', 'einem Monat'], | |
| 5176 | + 'MM': [number + ' Monate', number + ' Monaten'], | |
| 5177 | + 'y': ['ein Jahr', 'einem Jahr'], | |
| 5178 | + 'yy': [number + ' Jahre', number + ' Jahren'] | |
| 5179 | + }; | |
| 5180 | + return withoutSuffix ? format[key][0] : format[key][1]; | |
| 5181 | + } | |
| 5182 | + | |
| 5183 | + var de = moment__default.defineLocale('de', { | |
| 5184 | + months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), | |
| 5185 | + monthsShort : 'Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), | |
| 5186 | + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), | |
| 5187 | + weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), | |
| 5188 | + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), | |
| 5189 | + longDateFormat : { | |
| 5190 | + LT: 'HH:mm', | |
| 5191 | + LTS: 'HH:mm:ss', | |
| 5192 | + L : 'DD.MM.YYYY', | |
| 5193 | + LL : 'D. MMMM YYYY', | |
| 5194 | + LLL : 'D. MMMM YYYY HH:mm', | |
| 5195 | + LLLL : 'dddd, D. MMMM YYYY HH:mm' | |
| 5196 | + }, | |
| 5197 | + calendar : { | |
| 5198 | + sameDay: '[heute um] LT [Uhr]', | |
| 5199 | + sameElse: 'L', | |
| 5200 | + nextDay: '[morgen um] LT [Uhr]', | |
| 5201 | + nextWeek: 'dddd [um] LT [Uhr]', | |
| 5202 | + lastDay: '[gestern um] LT [Uhr]', | |
| 5203 | + lastWeek: '[letzten] dddd [um] LT [Uhr]' | |
| 5204 | + }, | |
| 5205 | + relativeTime : { | |
| 5206 | + future : 'in %s', | |
| 5207 | + past : 'vor %s', | |
| 5208 | + s : 'ein paar Sekunden', | |
| 5209 | + m : de__processRelativeTime, | |
| 5210 | + mm : '%d Minuten', | |
| 5211 | + h : de__processRelativeTime, | |
| 5212 | + hh : '%d Stunden', | |
| 5213 | + d : de__processRelativeTime, | |
| 5214 | + dd : de__processRelativeTime, | |
| 5215 | + M : de__processRelativeTime, | |
| 5216 | + MM : de__processRelativeTime, | |
| 5217 | + y : de__processRelativeTime, | |
| 5218 | + yy : de__processRelativeTime | |
| 5219 | + }, | |
| 5220 | + ordinalParse: /\d{1,2}\./, | |
| 5221 | + ordinal : '%d.', | |
| 5222 | + week : { | |
| 5223 | + dow : 1, // Monday is the first day of the week. | |
| 5224 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 5225 | + } | |
| 5226 | + }); | |
| 5227 | + | |
| 5228 | + //! moment.js locale configuration | |
| 5229 | + //! locale : dhivehi (dv) | |
| 5230 | + //! author : Jawish Hameed : https://github.com/jawish | |
| 5231 | + | |
| 5232 | + var dv__months = [ | |
| 5233 | + 'ޖެނުއަރީ', | |
| 5234 | + 'ފެބްރުއަރީ', | |
| 5235 | + 'މާރިޗު', | |
| 5236 | + 'އޭޕްރީލު', | |
| 5237 | + 'މޭ', | |
| 5238 | + 'ޖޫން', | |
| 5239 | + 'ޖުލައި', | |
| 5240 | + 'އޯގަސްޓު', | |
| 5241 | + 'ސެޕްޓެމްބަރު', | |
| 5242 | + 'އޮކްޓޯބަރު', | |
| 5243 | + 'ނޮވެމްބަރު', | |
| 5244 | + 'ޑިސެމްބަރު' | |
| 5245 | + ], dv__weekdays = [ | |
| 5246 | + 'އާދިއްތަ', | |
| 5247 | + 'ހޯމަ', | |
| 5248 | + 'އަންގާރަ', | |
| 5249 | + 'ބުދަ', | |
| 5250 | + 'ބުރާސްފަތި', | |
| 5251 | + 'ހުކުރު', | |
| 5252 | + 'ހޮނިހިރު' | |
| 5253 | + ]; | |
| 5254 | + | |
| 5255 | + var dv = moment__default.defineLocale('dv', { | |
| 5256 | + months : dv__months, | |
| 5257 | + monthsShort : dv__months, | |
| 5258 | + weekdays : dv__weekdays, | |
| 5259 | + weekdaysShort : dv__weekdays, | |
| 5260 | + weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), | |
| 5261 | + longDateFormat : { | |
| 5262 | + | |
| 5263 | + LT : 'HH:mm', | |
| 5264 | + LTS : 'HH:mm:ss', | |
| 5265 | + L : 'D/M/YYYY', | |
| 5266 | + LL : 'D MMMM YYYY', | |
| 5267 | + LLL : 'D MMMM YYYY HH:mm', | |
| 5268 | + LLLL : 'dddd D MMMM YYYY HH:mm' | |
| 5269 | + }, | |
| 5270 | + meridiemParse: /މކ|މފ/, | |
| 5271 | + isPM : function (input) { | |
| 5272 | + return '' === input; | |
| 5273 | + }, | |
| 5274 | + meridiem : function (hour, minute, isLower) { | |
| 5275 | + if (hour < 12) { | |
| 5276 | + return 'މކ'; | |
| 5277 | + } else { | |
| 5278 | + return 'މފ'; | |
| 5279 | + } | |
| 5280 | + }, | |
| 5281 | + calendar : { | |
| 5282 | + sameDay : '[މިއަދު] LT', | |
| 5283 | + nextDay : '[މާދަމާ] LT', | |
| 5284 | + nextWeek : 'dddd LT', | |
| 5285 | + lastDay : '[އިއްޔެ] LT', | |
| 5286 | + lastWeek : '[ފާއިތުވި] dddd LT', | |
| 5287 | + sameElse : 'L' | |
| 5288 | + }, | |
| 5289 | + relativeTime : { | |
| 5290 | + future : 'ތެރޭގައި %s', | |
| 5291 | + past : 'ކުރިން %s', | |
| 5292 | + s : 'ސިކުންތުކޮޅެއް', | |
| 5293 | + m : 'މިނިޓެއް', | |
| 5294 | + mm : 'މިނިޓު %d', | |
| 5295 | + h : 'ގަޑިއިރެއް', | |
| 5296 | + hh : 'ގަޑިއިރު %d', | |
| 5297 | + d : 'ދުވަހެއް', | |
| 5298 | + dd : 'ދުވަސް %d', | |
| 5299 | + M : 'މަހެއް', | |
| 5300 | + MM : 'މަސް %d', | |
| 5301 | + y : 'އަހަރެއް', | |
| 5302 | + yy : 'އަހަރު %d' | |
| 5303 | + }, | |
| 5304 | + preparse: function (string) { | |
| 5305 | + return string.replace(/،/g, ','); | |
| 5306 | + }, | |
| 5307 | + postformat: function (string) { | |
| 5308 | + return string.replace(/,/g, '،'); | |
| 5309 | + }, | |
| 5310 | + week : { | |
| 5311 | + dow : 7, // Sunday is the first day of the week. | |
| 5312 | + doy : 12 // The week that contains Jan 1st is the first week of the year. | |
| 5313 | + } | |
| 5314 | + }); | |
| 5315 | + | |
| 5316 | + //! moment.js locale configuration | |
| 5317 | + //! locale : modern greek (el) | |
| 5318 | + //! author : Aggelos Karalias : https://github.com/mehiel | |
| 5319 | + | |
| 5320 | + var el = moment__default.defineLocale('el', { | |
| 5321 | + monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'), | |
| 5322 | + monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'), | |
| 5323 | + months : function (momentToFormat, format) { | |
| 5324 | + if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM' | |
| 5325 | + return this._monthsGenitiveEl[momentToFormat.month()]; | |
| 5326 | + } else { | |
| 5327 | + return this._monthsNominativeEl[momentToFormat.month()]; | |
| 5328 | + } | |
| 5329 | + }, | |
| 5330 | + monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'), | |
| 5331 | + weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'), | |
| 5332 | + weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), | |
| 5333 | + weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), | |
| 5334 | + meridiem : function (hours, minutes, isLower) { | |
| 5335 | + if (hours > 11) { | |
| 5336 | + return isLower ? 'μμ' : 'ΜΜ'; | |
| 5337 | + } else { | |
| 5338 | + return isLower ? 'πμ' : 'ΠΜ'; | |
| 5339 | + } | |
| 5340 | + }, | |
| 5341 | + isPM : function (input) { | |
| 5342 | + return ((input + '').toLowerCase()[0] === 'μ'); | |
| 5343 | + }, | |
| 5344 | + meridiemParse : /[ΠΜ]\.?Μ?\.?/i, | |
| 5345 | + longDateFormat : { | |
| 5346 | + LT : 'h:mm A', | |
| 5347 | + LTS : 'h:mm:ss A', | |
| 5348 | + L : 'DD/MM/YYYY', | |
| 5349 | + LL : 'D MMMM YYYY', | |
| 5350 | + LLL : 'D MMMM YYYY h:mm A', | |
| 5351 | + LLLL : 'dddd, D MMMM YYYY h:mm A' | |
| 5352 | + }, | |
| 5353 | + calendarEl : { | |
| 5354 | + sameDay : '[Σήμερα {}] LT', | |
| 5355 | + nextDay : '[Αύριο {}] LT', | |
| 5356 | + nextWeek : 'dddd [{}] LT', | |
| 5357 | + lastDay : '[Χθες {}] LT', | |
| 5358 | + lastWeek : function () { | |
| 5359 | + switch (this.day()) { | |
| 5360 | + case 6: | |
| 5361 | + return '[το προηγούμενο] dddd [{}] LT'; | |
| 5362 | + default: | |
| 5363 | + return '[την προηγούμενη] dddd [{}] LT'; | |
| 5364 | + } | |
| 5365 | + }, | |
| 5366 | + sameElse : 'L' | |
| 5367 | + }, | |
| 5368 | + calendar : function (key, mom) { | |
| 5369 | + var output = this._calendarEl[key], | |
| 5370 | + hours = mom && mom.hours(); | |
| 5371 | + if (isFunction(output)) { | |
| 5372 | + output = output.apply(mom); | |
| 5373 | + } | |
| 5374 | + return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις')); | |
| 5375 | + }, | |
| 5376 | + relativeTime : { | |
| 5377 | + future : 'σε %s', | |
| 5378 | + past : '%s πριν', | |
| 5379 | + s : 'λίγα δευτερόλεπτα', | |
| 5380 | + m : 'ένα λεπτό', | |
| 5381 | + mm : '%d λεπτά', | |
| 5382 | + h : 'μία ώρα', | |
| 5383 | + hh : '%d ώρες', | |
| 5384 | + d : 'μία μέρα', | |
| 5385 | + dd : '%d μέρες', | |
| 5386 | + M : 'ένας μήνας', | |
| 5387 | + MM : '%d μήνες', | |
| 5388 | + y : 'ένας χρόνος', | |
| 5389 | + yy : '%d χρόνια' | |
| 5390 | + }, | |
| 5391 | + ordinalParse: /\d{1,2}η/, | |
| 5392 | + ordinal: '%dη', | |
| 5393 | + week : { | |
| 5394 | + dow : 1, // Monday is the first day of the week. | |
| 5395 | + doy : 4 // The week that contains Jan 4st is the first week of the year. | |
| 5396 | + } | |
| 5397 | + }); | |
| 5398 | + | |
| 5399 | + //! moment.js locale configuration | |
| 5400 | + //! locale : australian english (en-au) | |
| 5401 | + | |
| 5402 | + var en_au = moment__default.defineLocale('en-au', { | |
| 5403 | + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), | |
| 5404 | + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), | |
| 5405 | + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), | |
| 5406 | + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), | |
| 5407 | + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), | |
| 5408 | + longDateFormat : { | |
| 5409 | + LT : 'h:mm A', | |
| 5410 | + LTS : 'h:mm:ss A', | |
| 5411 | + L : 'DD/MM/YYYY', | |
| 5412 | + LL : 'D MMMM YYYY', | |
| 5413 | + LLL : 'D MMMM YYYY h:mm A', | |
| 5414 | + LLLL : 'dddd, D MMMM YYYY h:mm A' | |
| 5415 | + }, | |
| 5416 | + calendar : { | |
| 5417 | + sameDay : '[Today at] LT', | |
| 5418 | + nextDay : '[Tomorrow at] LT', | |
| 5419 | + nextWeek : 'dddd [at] LT', | |
| 5420 | + lastDay : '[Yesterday at] LT', | |
| 5421 | + lastWeek : '[Last] dddd [at] LT', | |
| 5422 | + sameElse : 'L' | |
| 5423 | + }, | |
| 5424 | + relativeTime : { | |
| 5425 | + future : 'in %s', | |
| 5426 | + past : '%s ago', | |
| 5427 | + s : 'a few seconds', | |
| 5428 | + m : 'a minute', | |
| 5429 | + mm : '%d minutes', | |
| 5430 | + h : 'an hour', | |
| 5431 | + hh : '%d hours', | |
| 5432 | + d : 'a day', | |
| 5433 | + dd : '%d days', | |
| 5434 | + M : 'a month', | |
| 5435 | + MM : '%d months', | |
| 5436 | + y : 'a year', | |
| 5437 | + yy : '%d years' | |
| 5438 | + }, | |
| 5439 | + ordinalParse: /\d{1,2}(st|nd|rd|th)/, | |
| 5440 | + ordinal : function (number) { | |
| 5441 | + var b = number % 10, | |
| 5442 | + output = (~~(number % 100 / 10) === 1) ? 'th' : | |
| 5443 | + (b === 1) ? 'st' : | |
| 5444 | + (b === 2) ? 'nd' : | |
| 5445 | + (b === 3) ? 'rd' : 'th'; | |
| 5446 | + return number + output; | |
| 5447 | + }, | |
| 5448 | + week : { | |
| 5449 | + dow : 1, // Monday is the first day of the week. | |
| 5450 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 5451 | + } | |
| 5452 | + }); | |
| 5453 | + | |
| 5454 | + //! moment.js locale configuration | |
| 5455 | + //! locale : canadian english (en-ca) | |
| 5456 | + //! author : Jonathan Abourbih : https://github.com/jonbca | |
| 5457 | + | |
| 5458 | + var en_ca = moment__default.defineLocale('en-ca', { | |
| 5459 | + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), | |
| 5460 | + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), | |
| 5461 | + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), | |
| 5462 | + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), | |
| 5463 | + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), | |
| 5464 | + longDateFormat : { | |
| 5465 | + LT : 'h:mm A', | |
| 5466 | + LTS : 'h:mm:ss A', | |
| 5467 | + L : 'YYYY-MM-DD', | |
| 5468 | + LL : 'D MMMM, YYYY', | |
| 5469 | + LLL : 'D MMMM, YYYY h:mm A', | |
| 5470 | + LLLL : 'dddd, D MMMM, YYYY h:mm A' | |
| 5471 | + }, | |
| 5472 | + calendar : { | |
| 5473 | + sameDay : '[Today at] LT', | |
| 5474 | + nextDay : '[Tomorrow at] LT', | |
| 5475 | + nextWeek : 'dddd [at] LT', | |
| 5476 | + lastDay : '[Yesterday at] LT', | |
| 5477 | + lastWeek : '[Last] dddd [at] LT', | |
| 5478 | + sameElse : 'L' | |
| 5479 | + }, | |
| 5480 | + relativeTime : { | |
| 5481 | + future : 'in %s', | |
| 5482 | + past : '%s ago', | |
| 5483 | + s : 'a few seconds', | |
| 5484 | + m : 'a minute', | |
| 5485 | + mm : '%d minutes', | |
| 5486 | + h : 'an hour', | |
| 5487 | + hh : '%d hours', | |
| 5488 | + d : 'a day', | |
| 5489 | + dd : '%d days', | |
| 5490 | + M : 'a month', | |
| 5491 | + MM : '%d months', | |
| 5492 | + y : 'a year', | |
| 5493 | + yy : '%d years' | |
| 5494 | + }, | |
| 5495 | + ordinalParse: /\d{1,2}(st|nd|rd|th)/, | |
| 5496 | + ordinal : function (number) { | |
| 5497 | + var b = number % 10, | |
| 5498 | + output = (~~(number % 100 / 10) === 1) ? 'th' : | |
| 5499 | + (b === 1) ? 'st' : | |
| 5500 | + (b === 2) ? 'nd' : | |
| 5501 | + (b === 3) ? 'rd' : 'th'; | |
| 5502 | + return number + output; | |
| 5503 | + } | |
| 5504 | + }); | |
| 5505 | + | |
| 5506 | + //! moment.js locale configuration | |
| 5507 | + //! locale : great britain english (en-gb) | |
| 5508 | + //! author : Chris Gedrim : https://github.com/chrisgedrim | |
| 5509 | + | |
| 5510 | + var en_gb = moment__default.defineLocale('en-gb', { | |
| 5511 | + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), | |
| 5512 | + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), | |
| 5513 | + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), | |
| 5514 | + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), | |
| 5515 | + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), | |
| 5516 | + longDateFormat : { | |
| 5517 | + LT : 'HH:mm', | |
| 5518 | + LTS : 'HH:mm:ss', | |
| 5519 | + L : 'DD/MM/YYYY', | |
| 5520 | + LL : 'D MMMM YYYY', | |
| 5521 | + LLL : 'D MMMM YYYY HH:mm', | |
| 5522 | + LLLL : 'dddd, D MMMM YYYY HH:mm' | |
| 5523 | + }, | |
| 5524 | + calendar : { | |
| 5525 | + sameDay : '[Today at] LT', | |
| 5526 | + nextDay : '[Tomorrow at] LT', | |
| 5527 | + nextWeek : 'dddd [at] LT', | |
| 5528 | + lastDay : '[Yesterday at] LT', | |
| 5529 | + lastWeek : '[Last] dddd [at] LT', | |
| 5530 | + sameElse : 'L' | |
| 5531 | + }, | |
| 5532 | + relativeTime : { | |
| 5533 | + future : 'in %s', | |
| 5534 | + past : '%s ago', | |
| 5535 | + s : 'a few seconds', | |
| 5536 | + m : 'a minute', | |
| 5537 | + mm : '%d minutes', | |
| 5538 | + h : 'an hour', | |
| 5539 | + hh : '%d hours', | |
| 5540 | + d : 'a day', | |
| 5541 | + dd : '%d days', | |
| 5542 | + M : 'a month', | |
| 5543 | + MM : '%d months', | |
| 5544 | + y : 'a year', | |
| 5545 | + yy : '%d years' | |
| 5546 | + }, | |
| 5547 | + ordinalParse: /\d{1,2}(st|nd|rd|th)/, | |
| 5548 | + ordinal : function (number) { | |
| 5549 | + var b = number % 10, | |
| 5550 | + output = (~~(number % 100 / 10) === 1) ? 'th' : | |
| 5551 | + (b === 1) ? 'st' : | |
| 5552 | + (b === 2) ? 'nd' : | |
| 5553 | + (b === 3) ? 'rd' : 'th'; | |
| 5554 | + return number + output; | |
| 5555 | + }, | |
| 5556 | + week : { | |
| 5557 | + dow : 1, // Monday is the first day of the week. | |
| 5558 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 5559 | + } | |
| 5560 | + }); | |
| 5561 | + | |
| 5562 | + //! moment.js locale configuration | |
| 5563 | + //! locale : Irish english (en-ie) | |
| 5564 | + //! author : Chris Cartlidge : https://github.com/chriscartlidge | |
| 5565 | + | |
| 5566 | + var en_ie = moment__default.defineLocale('en-ie', { | |
| 5567 | + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), | |
| 5568 | + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), | |
| 5569 | + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), | |
| 5570 | + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), | |
| 5571 | + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), | |
| 5572 | + longDateFormat : { | |
| 5573 | + LT : 'HH:mm', | |
| 5574 | + LTS : 'HH:mm:ss', | |
| 5575 | + L : 'DD-MM-YYYY', | |
| 5576 | + LL : 'D MMMM YYYY', | |
| 5577 | + LLL : 'D MMMM YYYY HH:mm', | |
| 5578 | + LLLL : 'dddd D MMMM YYYY HH:mm' | |
| 5579 | + }, | |
| 5580 | + calendar : { | |
| 5581 | + sameDay : '[Today at] LT', | |
| 5582 | + nextDay : '[Tomorrow at] LT', | |
| 5583 | + nextWeek : 'dddd [at] LT', | |
| 5584 | + lastDay : '[Yesterday at] LT', | |
| 5585 | + lastWeek : '[Last] dddd [at] LT', | |
| 5586 | + sameElse : 'L' | |
| 5587 | + }, | |
| 5588 | + relativeTime : { | |
| 5589 | + future : 'in %s', | |
| 5590 | + past : '%s ago', | |
| 5591 | + s : 'a few seconds', | |
| 5592 | + m : 'a minute', | |
| 5593 | + mm : '%d minutes', | |
| 5594 | + h : 'an hour', | |
| 5595 | + hh : '%d hours', | |
| 5596 | + d : 'a day', | |
| 5597 | + dd : '%d days', | |
| 5598 | + M : 'a month', | |
| 5599 | + MM : '%d months', | |
| 5600 | + y : 'a year', | |
| 5601 | + yy : '%d years' | |
| 5602 | + }, | |
| 5603 | + ordinalParse: /\d{1,2}(st|nd|rd|th)/, | |
| 5604 | + ordinal : function (number) { | |
| 5605 | + var b = number % 10, | |
| 5606 | + output = (~~(number % 100 / 10) === 1) ? 'th' : | |
| 5607 | + (b === 1) ? 'st' : | |
| 5608 | + (b === 2) ? 'nd' : | |
| 5609 | + (b === 3) ? 'rd' : 'th'; | |
| 5610 | + return number + output; | |
| 5611 | + }, | |
| 5612 | + week : { | |
| 5613 | + dow : 1, // Monday is the first day of the week. | |
| 5614 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 5615 | + } | |
| 5616 | + }); | |
| 5617 | + | |
| 5618 | + //! moment.js locale configuration | |
| 5619 | + //! locale : New Zealand english (en-nz) | |
| 5620 | + | |
| 5621 | + var en_nz = moment__default.defineLocale('en-nz', { | |
| 5622 | + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), | |
| 5623 | + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), | |
| 5624 | + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), | |
| 5625 | + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), | |
| 5626 | + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), | |
| 5627 | + longDateFormat : { | |
| 5628 | + LT : 'h:mm A', | |
| 5629 | + LTS : 'h:mm:ss A', | |
| 5630 | + L : 'DD/MM/YYYY', | |
| 5631 | + LL : 'D MMMM YYYY', | |
| 5632 | + LLL : 'D MMMM YYYY h:mm A', | |
| 5633 | + LLLL : 'dddd, D MMMM YYYY h:mm A' | |
| 5634 | + }, | |
| 5635 | + calendar : { | |
| 5636 | + sameDay : '[Today at] LT', | |
| 5637 | + nextDay : '[Tomorrow at] LT', | |
| 5638 | + nextWeek : 'dddd [at] LT', | |
| 5639 | + lastDay : '[Yesterday at] LT', | |
| 5640 | + lastWeek : '[Last] dddd [at] LT', | |
| 5641 | + sameElse : 'L' | |
| 5642 | + }, | |
| 5643 | + relativeTime : { | |
| 5644 | + future : 'in %s', | |
| 5645 | + past : '%s ago', | |
| 5646 | + s : 'a few seconds', | |
| 5647 | + m : 'a minute', | |
| 5648 | + mm : '%d minutes', | |
| 5649 | + h : 'an hour', | |
| 5650 | + hh : '%d hours', | |
| 5651 | + d : 'a day', | |
| 5652 | + dd : '%d days', | |
| 5653 | + M : 'a month', | |
| 5654 | + MM : '%d months', | |
| 5655 | + y : 'a year', | |
| 5656 | + yy : '%d years' | |
| 5657 | + }, | |
| 5658 | + ordinalParse: /\d{1,2}(st|nd|rd|th)/, | |
| 5659 | + ordinal : function (number) { | |
| 5660 | + var b = number % 10, | |
| 5661 | + output = (~~(number % 100 / 10) === 1) ? 'th' : | |
| 5662 | + (b === 1) ? 'st' : | |
| 5663 | + (b === 2) ? 'nd' : | |
| 5664 | + (b === 3) ? 'rd' : 'th'; | |
| 5665 | + return number + output; | |
| 5666 | + }, | |
| 5667 | + week : { | |
| 5668 | + dow : 1, // Monday is the first day of the week. | |
| 5669 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 5670 | + } | |
| 5671 | + }); | |
| 5672 | + | |
| 5673 | + //! moment.js locale configuration | |
| 5674 | + //! locale : esperanto (eo) | |
| 5675 | + //! author : Colin Dean : https://github.com/colindean | |
| 5676 | + //! komento: Mi estas malcerta se mi korekte traktis akuzativojn en tiu traduko. | |
| 5677 | + //! Se ne, bonvolu korekti kaj avizi min por ke mi povas lerni! | |
| 5678 | + | |
| 5679 | + var eo = moment__default.defineLocale('eo', { | |
| 5680 | + months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'), | |
| 5681 | + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'), | |
| 5682 | + weekdays : 'Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato'.split('_'), | |
| 5683 | + weekdaysShort : 'Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab'.split('_'), | |
| 5684 | + weekdaysMin : 'Di_Lu_Ma_Me_Ĵa_Ve_Sa'.split('_'), | |
| 5685 | + longDateFormat : { | |
| 5686 | + LT : 'HH:mm', | |
| 5687 | + LTS : 'HH:mm:ss', | |
| 5688 | + L : 'YYYY-MM-DD', | |
| 5689 | + LL : 'D[-an de] MMMM, YYYY', | |
| 5690 | + LLL : 'D[-an de] MMMM, YYYY HH:mm', | |
| 5691 | + LLLL : 'dddd, [la] D[-an de] MMMM, YYYY HH:mm' | |
| 5692 | + }, | |
| 5693 | + meridiemParse: /[ap]\.t\.m/i, | |
| 5694 | + isPM: function (input) { | |
| 5695 | + return input.charAt(0).toLowerCase() === 'p'; | |
| 5696 | + }, | |
| 5697 | + meridiem : function (hours, minutes, isLower) { | |
| 5698 | + if (hours > 11) { | |
| 5699 | + return isLower ? 'p.t.m.' : 'P.T.M.'; | |
| 5700 | + } else { | |
| 5701 | + return isLower ? 'a.t.m.' : 'A.T.M.'; | |
| 5702 | + } | |
| 5703 | + }, | |
| 5704 | + calendar : { | |
| 5705 | + sameDay : '[Hodiaŭ je] LT', | |
| 5706 | + nextDay : '[Morgaŭ je] LT', | |
| 5707 | + nextWeek : 'dddd [je] LT', | |
| 5708 | + lastDay : '[Hieraŭ je] LT', | |
| 5709 | + lastWeek : '[pasinta] dddd [je] LT', | |
| 5710 | + sameElse : 'L' | |
| 5711 | + }, | |
| 5712 | + relativeTime : { | |
| 5713 | + future : 'je %s', | |
| 5714 | + past : 'antaŭ %s', | |
| 5715 | + s : 'sekundoj', | |
| 5716 | + m : 'minuto', | |
| 5717 | + mm : '%d minutoj', | |
| 5718 | + h : 'horo', | |
| 5719 | + hh : '%d horoj', | |
| 5720 | + d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo | |
| 5721 | + dd : '%d tagoj', | |
| 5722 | + M : 'monato', | |
| 5723 | + MM : '%d monatoj', | |
| 5724 | + y : 'jaro', | |
| 5725 | + yy : '%d jaroj' | |
| 5726 | + }, | |
| 5727 | + ordinalParse: /\d{1,2}a/, | |
| 5728 | + ordinal : '%da', | |
| 5729 | + week : { | |
| 5730 | + dow : 1, // Monday is the first day of the week. | |
| 5731 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 5732 | + } | |
| 5733 | + }); | |
| 5734 | + | |
| 5735 | + //! moment.js locale configuration | |
| 5736 | + //! locale : spanish (es) | |
| 5737 | + //! author : Julio Napurí : https://github.com/julionc | |
| 5738 | + | |
| 5739 | + var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), | |
| 5740 | + es__monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); | |
| 5741 | + | |
| 5742 | + var es = moment__default.defineLocale('es', { | |
| 5743 | + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), | |
| 5744 | + monthsShort : function (m, format) { | |
| 5745 | + if (/-MMM-/.test(format)) { | |
| 5746 | + return es__monthsShort[m.month()]; | |
| 5747 | + } else { | |
| 5748 | + return monthsShortDot[m.month()]; | |
| 5749 | + } | |
| 5750 | + }, | |
| 5751 | + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), | |
| 5752 | + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), | |
| 5753 | + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), | |
| 5754 | + longDateFormat : { | |
| 5755 | + LT : 'H:mm', | |
| 5756 | + LTS : 'H:mm:ss', | |
| 5757 | + L : 'DD/MM/YYYY', | |
| 5758 | + LL : 'D [de] MMMM [de] YYYY', | |
| 5759 | + LLL : 'D [de] MMMM [de] YYYY H:mm', | |
| 5760 | + LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' | |
| 5761 | + }, | |
| 5762 | + calendar : { | |
| 5763 | + sameDay : function () { | |
| 5764 | + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; | |
| 5765 | + }, | |
| 5766 | + nextDay : function () { | |
| 5767 | + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; | |
| 5768 | + }, | |
| 5769 | + nextWeek : function () { | |
| 5770 | + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; | |
| 5771 | + }, | |
| 5772 | + lastDay : function () { | |
| 5773 | + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; | |
| 5774 | + }, | |
| 5775 | + lastWeek : function () { | |
| 5776 | + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; | |
| 5777 | + }, | |
| 5778 | + sameElse : 'L' | |
| 5779 | + }, | |
| 5780 | + relativeTime : { | |
| 5781 | + future : 'en %s', | |
| 5782 | + past : 'hace %s', | |
| 5783 | + s : 'unos segundos', | |
| 5784 | + m : 'un minuto', | |
| 5785 | + mm : '%d minutos', | |
| 5786 | + h : 'una hora', | |
| 5787 | + hh : '%d horas', | |
| 5788 | + d : 'un día', | |
| 5789 | + dd : '%d días', | |
| 5790 | + M : 'un mes', | |
| 5791 | + MM : '%d meses', | |
| 5792 | + y : 'un año', | |
| 5793 | + yy : '%d años' | |
| 5794 | + }, | |
| 5795 | + ordinalParse : /\d{1,2}º/, | |
| 5796 | + ordinal : '%dº', | |
| 5797 | + week : { | |
| 5798 | + dow : 1, // Monday is the first day of the week. | |
| 5799 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 5800 | + } | |
| 5801 | + }); | |
| 5802 | + | |
| 5803 | + //! moment.js locale configuration | |
| 5804 | + //! locale : estonian (et) | |
| 5805 | + //! author : Henry Kehlmann : https://github.com/madhenry | |
| 5806 | + //! improvements : Illimar Tambek : https://github.com/ragulka | |
| 5807 | + | |
| 5808 | + function et__processRelativeTime(number, withoutSuffix, key, isFuture) { | |
| 5809 | + var format = { | |
| 5810 | + 's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'], | |
| 5811 | + 'm' : ['ühe minuti', 'üks minut'], | |
| 5812 | + 'mm': [number + ' minuti', number + ' minutit'], | |
| 5813 | + 'h' : ['ühe tunni', 'tund aega', 'üks tund'], | |
| 5814 | + 'hh': [number + ' tunni', number + ' tundi'], | |
| 5815 | + 'd' : ['ühe päeva', 'üks päev'], | |
| 5816 | + 'M' : ['kuu aja', 'kuu aega', 'üks kuu'], | |
| 5817 | + 'MM': [number + ' kuu', number + ' kuud'], | |
| 5818 | + 'y' : ['ühe aasta', 'aasta', 'üks aasta'], | |
| 5819 | + 'yy': [number + ' aasta', number + ' aastat'] | |
| 5820 | + }; | |
| 5821 | + if (withoutSuffix) { | |
| 5822 | + return format[key][2] ? format[key][2] : format[key][1]; | |
| 5823 | + } | |
| 5824 | + return isFuture ? format[key][0] : format[key][1]; | |
| 5825 | + } | |
| 5826 | + | |
| 5827 | + var et = moment__default.defineLocale('et', { | |
| 5828 | + months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'), | |
| 5829 | + monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'), | |
| 5830 | + weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'), | |
| 5831 | + weekdaysShort : 'P_E_T_K_N_R_L'.split('_'), | |
| 5832 | + weekdaysMin : 'P_E_T_K_N_R_L'.split('_'), | |
| 5833 | + longDateFormat : { | |
| 5834 | + LT : 'H:mm', | |
| 5835 | + LTS : 'H:mm:ss', | |
| 5836 | + L : 'DD.MM.YYYY', | |
| 5837 | + LL : 'D. MMMM YYYY', | |
| 5838 | + LLL : 'D. MMMM YYYY H:mm', | |
| 5839 | + LLLL : 'dddd, D. MMMM YYYY H:mm' | |
| 5840 | + }, | |
| 5841 | + calendar : { | |
| 5842 | + sameDay : '[Täna,] LT', | |
| 5843 | + nextDay : '[Homme,] LT', | |
| 5844 | + nextWeek : '[Järgmine] dddd LT', | |
| 5845 | + lastDay : '[Eile,] LT', | |
| 5846 | + lastWeek : '[Eelmine] dddd LT', | |
| 5847 | + sameElse : 'L' | |
| 5848 | + }, | |
| 5849 | + relativeTime : { | |
| 5850 | + future : '%s pärast', | |
| 5851 | + past : '%s tagasi', | |
| 5852 | + s : et__processRelativeTime, | |
| 5853 | + m : et__processRelativeTime, | |
| 5854 | + mm : et__processRelativeTime, | |
| 5855 | + h : et__processRelativeTime, | |
| 5856 | + hh : et__processRelativeTime, | |
| 5857 | + d : et__processRelativeTime, | |
| 5858 | + dd : '%d päeva', | |
| 5859 | + M : et__processRelativeTime, | |
| 5860 | + MM : et__processRelativeTime, | |
| 5861 | + y : et__processRelativeTime, | |
| 5862 | + yy : et__processRelativeTime | |
| 5863 | + }, | |
| 5864 | + ordinalParse: /\d{1,2}\./, | |
| 5865 | + ordinal : '%d.', | |
| 5866 | + week : { | |
| 5867 | + dow : 1, // Monday is the first day of the week. | |
| 5868 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 5869 | + } | |
| 5870 | + }); | |
| 5871 | + | |
| 5872 | + //! moment.js locale configuration | |
| 5873 | + //! locale : euskara (eu) | |
| 5874 | + //! author : Eneko Illarramendi : https://github.com/eillarra | |
| 5875 | + | |
| 5876 | + var eu = moment__default.defineLocale('eu', { | |
| 5877 | + months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'), | |
| 5878 | + monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'), | |
| 5879 | + weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'), | |
| 5880 | + weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'), | |
| 5881 | + weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'), | |
| 5882 | + longDateFormat : { | |
| 5883 | + LT : 'HH:mm', | |
| 5884 | + LTS : 'HH:mm:ss', | |
| 5885 | + L : 'YYYY-MM-DD', | |
| 5886 | + LL : 'YYYY[ko] MMMM[ren] D[a]', | |
| 5887 | + LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm', | |
| 5888 | + LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', | |
| 5889 | + l : 'YYYY-M-D', | |
| 5890 | + ll : 'YYYY[ko] MMM D[a]', | |
| 5891 | + lll : 'YYYY[ko] MMM D[a] HH:mm', | |
| 5892 | + llll : 'ddd, YYYY[ko] MMM D[a] HH:mm' | |
| 5893 | + }, | |
| 5894 | + calendar : { | |
| 5895 | + sameDay : '[gaur] LT[etan]', | |
| 5896 | + nextDay : '[bihar] LT[etan]', | |
| 5897 | + nextWeek : 'dddd LT[etan]', | |
| 5898 | + lastDay : '[atzo] LT[etan]', | |
| 5899 | + lastWeek : '[aurreko] dddd LT[etan]', | |
| 5900 | + sameElse : 'L' | |
| 5901 | + }, | |
| 5902 | + relativeTime : { | |
| 5903 | + future : '%s barru', | |
| 5904 | + past : 'duela %s', | |
| 5905 | + s : 'segundo batzuk', | |
| 5906 | + m : 'minutu bat', | |
| 5907 | + mm : '%d minutu', | |
| 5908 | + h : 'ordu bat', | |
| 5909 | + hh : '%d ordu', | |
| 5910 | + d : 'egun bat', | |
| 5911 | + dd : '%d egun', | |
| 5912 | + M : 'hilabete bat', | |
| 5913 | + MM : '%d hilabete', | |
| 5914 | + y : 'urte bat', | |
| 5915 | + yy : '%d urte' | |
| 5916 | + }, | |
| 5917 | + ordinalParse: /\d{1,2}\./, | |
| 5918 | + ordinal : '%d.', | |
| 5919 | + week : { | |
| 5920 | + dow : 1, // Monday is the first day of the week. | |
| 5921 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 5922 | + } | |
| 5923 | + }); | |
| 5924 | + | |
| 5925 | + //! moment.js locale configuration | |
| 5926 | + //! locale : Persian (fa) | |
| 5927 | + //! author : Ebrahim Byagowi : https://github.com/ebraminio | |
| 5928 | + | |
| 5929 | + var fa__symbolMap = { | |
| 5930 | + '1': '۱', | |
| 5931 | + '2': '۲', | |
| 5932 | + '3': '۳', | |
| 5933 | + '4': '۴', | |
| 5934 | + '5': '۵', | |
| 5935 | + '6': '۶', | |
| 5936 | + '7': '۷', | |
| 5937 | + '8': '۸', | |
| 5938 | + '9': '۹', | |
| 5939 | + '0': '۰' | |
| 5940 | + }, fa__numberMap = { | |
| 5941 | + '۱': '1', | |
| 5942 | + '۲': '2', | |
| 5943 | + '۳': '3', | |
| 5944 | + '۴': '4', | |
| 5945 | + '۵': '5', | |
| 5946 | + '۶': '6', | |
| 5947 | + '۷': '7', | |
| 5948 | + '۸': '8', | |
| 5949 | + '۹': '9', | |
| 5950 | + '۰': '0' | |
| 5951 | + }; | |
| 5952 | + | |
| 5953 | + var fa = moment__default.defineLocale('fa', { | |
| 5954 | + months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), | |
| 5955 | + monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), | |
| 5956 | + weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), | |
| 5957 | + weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), | |
| 5958 | + weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'), | |
| 5959 | + longDateFormat : { | |
| 5960 | + LT : 'HH:mm', | |
| 5961 | + LTS : 'HH:mm:ss', | |
| 5962 | + L : 'DD/MM/YYYY', | |
| 5963 | + LL : 'D MMMM YYYY', | |
| 5964 | + LLL : 'D MMMM YYYY HH:mm', | |
| 5965 | + LLLL : 'dddd, D MMMM YYYY HH:mm' | |
| 5966 | + }, | |
| 5967 | + meridiemParse: /قبل از ظهر|بعد از ظهر/, | |
| 5968 | + isPM: function (input) { | |
| 5969 | + return /بعد از ظهر/.test(input); | |
| 5970 | + }, | |
| 5971 | + meridiem : function (hour, minute, isLower) { | |
| 5972 | + if (hour < 12) { | |
| 5973 | + return 'قبل از ظهر'; | |
| 5974 | + } else { | |
| 5975 | + return 'بعد از ظهر'; | |
| 5976 | + } | |
| 5977 | + }, | |
| 5978 | + calendar : { | |
| 5979 | + sameDay : '[امروز ساعت] LT', | |
| 5980 | + nextDay : '[فردا ساعت] LT', | |
| 5981 | + nextWeek : 'dddd [ساعت] LT', | |
| 5982 | + lastDay : '[دیروز ساعت] LT', | |
| 5983 | + lastWeek : 'dddd [پیش] [ساعت] LT', | |
| 5984 | + sameElse : 'L' | |
| 5985 | + }, | |
| 5986 | + relativeTime : { | |
| 5987 | + future : 'در %s', | |
| 5988 | + past : '%s پیش', | |
| 5989 | + s : 'چندین ثانیه', | |
| 5990 | + m : 'یک دقیقه', | |
| 5991 | + mm : '%d دقیقه', | |
| 5992 | + h : 'یک ساعت', | |
| 5993 | + hh : '%d ساعت', | |
| 5994 | + d : 'یک روز', | |
| 5995 | + dd : '%d روز', | |
| 5996 | + M : 'یک ماه', | |
| 5997 | + MM : '%d ماه', | |
| 5998 | + y : 'یک سال', | |
| 5999 | + yy : '%d سال' | |
| 6000 | + }, | |
| 6001 | + preparse: function (string) { | |
| 6002 | + return string.replace(/[۰-۹]/g, function (match) { | |
| 6003 | + return fa__numberMap[match]; | |
| 6004 | + }).replace(/،/g, ','); | |
| 6005 | + }, | |
| 6006 | + postformat: function (string) { | |
| 6007 | + return string.replace(/\d/g, function (match) { | |
| 6008 | + return fa__symbolMap[match]; | |
| 6009 | + }).replace(/,/g, '،'); | |
| 6010 | + }, | |
| 6011 | + ordinalParse: /\d{1,2}م/, | |
| 6012 | + ordinal : '%dم', | |
| 6013 | + week : { | |
| 6014 | + dow : 6, // Saturday is the first day of the week. | |
| 6015 | + doy : 12 // The week that contains Jan 1st is the first week of the year. | |
| 6016 | + } | |
| 6017 | + }); | |
| 6018 | + | |
| 6019 | + //! moment.js locale configuration | |
| 6020 | + //! locale : finnish (fi) | |
| 6021 | + //! author : Tarmo Aidantausta : https://github.com/bleadof | |
| 6022 | + | |
| 6023 | + var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '), | |
| 6024 | + numbersFuture = [ | |
| 6025 | + 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden', | |
| 6026 | + numbersPast[7], numbersPast[8], numbersPast[9] | |
| 6027 | + ]; | |
| 6028 | + function fi__translate(number, withoutSuffix, key, isFuture) { | |
| 6029 | + var result = ''; | |
| 6030 | + switch (key) { | |
| 6031 | + case 's': | |
| 6032 | + return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; | |
| 6033 | + case 'm': | |
| 6034 | + return isFuture ? 'minuutin' : 'minuutti'; | |
| 6035 | + case 'mm': | |
| 6036 | + result = isFuture ? 'minuutin' : 'minuuttia'; | |
| 6037 | + break; | |
| 6038 | + case 'h': | |
| 6039 | + return isFuture ? 'tunnin' : 'tunti'; | |
| 6040 | + case 'hh': | |
| 6041 | + result = isFuture ? 'tunnin' : 'tuntia'; | |
| 6042 | + break; | |
| 6043 | + case 'd': | |
| 6044 | + return isFuture ? 'päivän' : 'päivä'; | |
| 6045 | + case 'dd': | |
| 6046 | + result = isFuture ? 'päivän' : 'päivää'; | |
| 6047 | + break; | |
| 6048 | + case 'M': | |
| 6049 | + return isFuture ? 'kuukauden' : 'kuukausi'; | |
| 6050 | + case 'MM': | |
| 6051 | + result = isFuture ? 'kuukauden' : 'kuukautta'; | |
| 6052 | + break; | |
| 6053 | + case 'y': | |
| 6054 | + return isFuture ? 'vuoden' : 'vuosi'; | |
| 6055 | + case 'yy': | |
| 6056 | + result = isFuture ? 'vuoden' : 'vuotta'; | |
| 6057 | + break; | |
| 6058 | + } | |
| 6059 | + result = verbalNumber(number, isFuture) + ' ' + result; | |
| 6060 | + return result; | |
| 6061 | + } | |
| 6062 | + function verbalNumber(number, isFuture) { | |
| 6063 | + return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number; | |
| 6064 | + } | |
| 6065 | + | |
| 6066 | + var fi = moment__default.defineLocale('fi', { | |
| 6067 | + months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'), | |
| 6068 | + monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'), | |
| 6069 | + weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'), | |
| 6070 | + weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'), | |
| 6071 | + weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'), | |
| 6072 | + longDateFormat : { | |
| 6073 | + LT : 'HH.mm', | |
| 6074 | + LTS : 'HH.mm.ss', | |
| 6075 | + L : 'DD.MM.YYYY', | |
| 6076 | + LL : 'Do MMMM[ta] YYYY', | |
| 6077 | + LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm', | |
| 6078 | + LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', | |
| 6079 | + l : 'D.M.YYYY', | |
| 6080 | + ll : 'Do MMM YYYY', | |
| 6081 | + lll : 'Do MMM YYYY, [klo] HH.mm', | |
| 6082 | + llll : 'ddd, Do MMM YYYY, [klo] HH.mm' | |
| 6083 | + }, | |
| 6084 | + calendar : { | |
| 6085 | + sameDay : '[tänään] [klo] LT', | |
| 6086 | + nextDay : '[huomenna] [klo] LT', | |
| 6087 | + nextWeek : 'dddd [klo] LT', | |
| 6088 | + lastDay : '[eilen] [klo] LT', | |
| 6089 | + lastWeek : '[viime] dddd[na] [klo] LT', | |
| 6090 | + sameElse : 'L' | |
| 6091 | + }, | |
| 6092 | + relativeTime : { | |
| 6093 | + future : '%s päästä', | |
| 6094 | + past : '%s sitten', | |
| 6095 | + s : fi__translate, | |
| 6096 | + m : fi__translate, | |
| 6097 | + mm : fi__translate, | |
| 6098 | + h : fi__translate, | |
| 6099 | + hh : fi__translate, | |
| 6100 | + d : fi__translate, | |
| 6101 | + dd : fi__translate, | |
| 6102 | + M : fi__translate, | |
| 6103 | + MM : fi__translate, | |
| 6104 | + y : fi__translate, | |
| 6105 | + yy : fi__translate | |
| 6106 | + }, | |
| 6107 | + ordinalParse: /\d{1,2}\./, | |
| 6108 | + ordinal : '%d.', | |
| 6109 | + week : { | |
| 6110 | + dow : 1, // Monday is the first day of the week. | |
| 6111 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 6112 | + } | |
| 6113 | + }); | |
| 6114 | + | |
| 6115 | + //! moment.js locale configuration | |
| 6116 | + //! locale : faroese (fo) | |
| 6117 | + //! author : Ragnar Johannesen : https://github.com/ragnar123 | |
| 6118 | + | |
| 6119 | + var fo = moment__default.defineLocale('fo', { | |
| 6120 | + months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'), | |
| 6121 | + monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), | |
| 6122 | + weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'), | |
| 6123 | + weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'), | |
| 6124 | + weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'), | |
| 6125 | + longDateFormat : { | |
| 6126 | + LT : 'HH:mm', | |
| 6127 | + LTS : 'HH:mm:ss', | |
| 6128 | + L : 'DD/MM/YYYY', | |
| 6129 | + LL : 'D MMMM YYYY', | |
| 6130 | + LLL : 'D MMMM YYYY HH:mm', | |
| 6131 | + LLLL : 'dddd D. MMMM, YYYY HH:mm' | |
| 6132 | + }, | |
| 6133 | + calendar : { | |
| 6134 | + sameDay : '[Í dag kl.] LT', | |
| 6135 | + nextDay : '[Í morgin kl.] LT', | |
| 6136 | + nextWeek : 'dddd [kl.] LT', | |
| 6137 | + lastDay : '[Í gjár kl.] LT', | |
| 6138 | + lastWeek : '[síðstu] dddd [kl] LT', | |
| 6139 | + sameElse : 'L' | |
| 6140 | + }, | |
| 6141 | + relativeTime : { | |
| 6142 | + future : 'um %s', | |
| 6143 | + past : '%s síðani', | |
| 6144 | + s : 'fá sekund', | |
| 6145 | + m : 'ein minutt', | |
| 6146 | + mm : '%d minuttir', | |
| 6147 | + h : 'ein tími', | |
| 6148 | + hh : '%d tímar', | |
| 6149 | + d : 'ein dagur', | |
| 6150 | + dd : '%d dagar', | |
| 6151 | + M : 'ein mánaði', | |
| 6152 | + MM : '%d mánaðir', | |
| 6153 | + y : 'eitt ár', | |
| 6154 | + yy : '%d ár' | |
| 6155 | + }, | |
| 6156 | + ordinalParse: /\d{1,2}\./, | |
| 6157 | + ordinal : '%d.', | |
| 6158 | + week : { | |
| 6159 | + dow : 1, // Monday is the first day of the week. | |
| 6160 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 6161 | + } | |
| 6162 | + }); | |
| 6163 | + | |
| 6164 | + //! moment.js locale configuration | |
| 6165 | + //! locale : canadian french (fr-ca) | |
| 6166 | + //! author : Jonathan Abourbih : https://github.com/jonbca | |
| 6167 | + | |
| 6168 | + var fr_ca = moment__default.defineLocale('fr-ca', { | |
| 6169 | + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), | |
| 6170 | + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), | |
| 6171 | + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), | |
| 6172 | + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), | |
| 6173 | + weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'), | |
| 6174 | + longDateFormat : { | |
| 6175 | + LT : 'HH:mm', | |
| 6176 | + LTS : 'HH:mm:ss', | |
| 6177 | + L : 'YYYY-MM-DD', | |
| 6178 | + LL : 'D MMMM YYYY', | |
| 6179 | + LLL : 'D MMMM YYYY HH:mm', | |
| 6180 | + LLLL : 'dddd D MMMM YYYY HH:mm' | |
| 6181 | + }, | |
| 6182 | + calendar : { | |
| 6183 | + sameDay: '[Aujourd\'hui à] LT', | |
| 6184 | + nextDay: '[Demain à] LT', | |
| 6185 | + nextWeek: 'dddd [à] LT', | |
| 6186 | + lastDay: '[Hier à] LT', | |
| 6187 | + lastWeek: 'dddd [dernier à] LT', | |
| 6188 | + sameElse: 'L' | |
| 6189 | + }, | |
| 6190 | + relativeTime : { | |
| 6191 | + future : 'dans %s', | |
| 6192 | + past : 'il y a %s', | |
| 6193 | + s : 'quelques secondes', | |
| 6194 | + m : 'une minute', | |
| 6195 | + mm : '%d minutes', | |
| 6196 | + h : 'une heure', | |
| 6197 | + hh : '%d heures', | |
| 6198 | + d : 'un jour', | |
| 6199 | + dd : '%d jours', | |
| 6200 | + M : 'un mois', | |
| 6201 | + MM : '%d mois', | |
| 6202 | + y : 'un an', | |
| 6203 | + yy : '%d ans' | |
| 6204 | + }, | |
| 6205 | + ordinalParse: /\d{1,2}(er|e)/, | |
| 6206 | + ordinal : function (number) { | |
| 6207 | + return number + (number === 1 ? 'er' : 'e'); | |
| 6208 | + } | |
| 6209 | + }); | |
| 6210 | + | |
| 6211 | + //! moment.js locale configuration | |
| 6212 | + //! locale : swiss french (fr) | |
| 6213 | + //! author : Gaspard Bucher : https://github.com/gaspard | |
| 6214 | + | |
| 6215 | + var fr_ch = moment__default.defineLocale('fr-ch', { | |
| 6216 | + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), | |
| 6217 | + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), | |
| 6218 | + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), | |
| 6219 | + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), | |
| 6220 | + weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'), | |
| 6221 | + longDateFormat : { | |
| 6222 | + LT : 'HH:mm', | |
| 6223 | + LTS : 'HH:mm:ss', | |
| 6224 | + L : 'DD.MM.YYYY', | |
| 6225 | + LL : 'D MMMM YYYY', | |
| 6226 | + LLL : 'D MMMM YYYY HH:mm', | |
| 6227 | + LLLL : 'dddd D MMMM YYYY HH:mm' | |
| 6228 | + }, | |
| 6229 | + calendar : { | |
| 6230 | + sameDay: '[Aujourd\'hui à] LT', | |
| 6231 | + nextDay: '[Demain à] LT', | |
| 6232 | + nextWeek: 'dddd [à] LT', | |
| 6233 | + lastDay: '[Hier à] LT', | |
| 6234 | + lastWeek: 'dddd [dernier à] LT', | |
| 6235 | + sameElse: 'L' | |
| 6236 | + }, | |
| 6237 | + relativeTime : { | |
| 6238 | + future : 'dans %s', | |
| 6239 | + past : 'il y a %s', | |
| 6240 | + s : 'quelques secondes', | |
| 6241 | + m : 'une minute', | |
| 6242 | + mm : '%d minutes', | |
| 6243 | + h : 'une heure', | |
| 6244 | + hh : '%d heures', | |
| 6245 | + d : 'un jour', | |
| 6246 | + dd : '%d jours', | |
| 6247 | + M : 'un mois', | |
| 6248 | + MM : '%d mois', | |
| 6249 | + y : 'un an', | |
| 6250 | + yy : '%d ans' | |
| 6251 | + }, | |
| 6252 | + ordinalParse: /\d{1,2}(er|e)/, | |
| 6253 | + ordinal : function (number) { | |
| 6254 | + return number + (number === 1 ? 'er' : 'e'); | |
| 6255 | + }, | |
| 6256 | + week : { | |
| 6257 | + dow : 1, // Monday is the first day of the week. | |
| 6258 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 6259 | + } | |
| 6260 | + }); | |
| 6261 | + | |
| 6262 | + //! moment.js locale configuration | |
| 6263 | + //! locale : french (fr) | |
| 6264 | + //! author : John Fischer : https://github.com/jfroffice | |
| 6265 | + | |
| 6266 | + var fr = moment__default.defineLocale('fr', { | |
| 6267 | + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), | |
| 6268 | + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), | |
| 6269 | + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), | |
| 6270 | + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), | |
| 6271 | + weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'), | |
| 6272 | + longDateFormat : { | |
| 6273 | + LT : 'HH:mm', | |
| 6274 | + LTS : 'HH:mm:ss', | |
| 6275 | + L : 'DD/MM/YYYY', | |
| 6276 | + LL : 'D MMMM YYYY', | |
| 6277 | + LLL : 'D MMMM YYYY HH:mm', | |
| 6278 | + LLLL : 'dddd D MMMM YYYY HH:mm' | |
| 6279 | + }, | |
| 6280 | + calendar : { | |
| 6281 | + sameDay: '[Aujourd\'hui à] LT', | |
| 6282 | + nextDay: '[Demain à] LT', | |
| 6283 | + nextWeek: 'dddd [à] LT', | |
| 6284 | + lastDay: '[Hier à] LT', | |
| 6285 | + lastWeek: 'dddd [dernier à] LT', | |
| 6286 | + sameElse: 'L' | |
| 6287 | + }, | |
| 6288 | + relativeTime : { | |
| 6289 | + future : 'dans %s', | |
| 6290 | + past : 'il y a %s', | |
| 6291 | + s : 'quelques secondes', | |
| 6292 | + m : 'une minute', | |
| 6293 | + mm : '%d minutes', | |
| 6294 | + h : 'une heure', | |
| 6295 | + hh : '%d heures', | |
| 6296 | + d : 'un jour', | |
| 6297 | + dd : '%d jours', | |
| 6298 | + M : 'un mois', | |
| 6299 | + MM : '%d mois', | |
| 6300 | + y : 'un an', | |
| 6301 | + yy : '%d ans' | |
| 6302 | + }, | |
| 6303 | + ordinalParse: /\d{1,2}(er|)/, | |
| 6304 | + ordinal : function (number) { | |
| 6305 | + return number + (number === 1 ? 'er' : ''); | |
| 6306 | + }, | |
| 6307 | + week : { | |
| 6308 | + dow : 1, // Monday is the first day of the week. | |
| 6309 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 6310 | + } | |
| 6311 | + }); | |
| 6312 | + | |
| 6313 | + //! moment.js locale configuration | |
| 6314 | + //! locale : frisian (fy) | |
| 6315 | + //! author : Robin van der Vliet : https://github.com/robin0van0der0v | |
| 6316 | + | |
| 6317 | + var fy__monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'), | |
| 6318 | + fy__monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'); | |
| 6319 | + | |
| 6320 | + var fy = moment__default.defineLocale('fy', { | |
| 6321 | + months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'), | |
| 6322 | + monthsShort : function (m, format) { | |
| 6323 | + if (/-MMM-/.test(format)) { | |
| 6324 | + return fy__monthsShortWithoutDots[m.month()]; | |
| 6325 | + } else { | |
| 6326 | + return fy__monthsShortWithDots[m.month()]; | |
| 6327 | + } | |
| 6328 | + }, | |
| 6329 | + weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'), | |
| 6330 | + weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'), | |
| 6331 | + weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), | |
| 6332 | + longDateFormat : { | |
| 6333 | + LT : 'HH:mm', | |
| 6334 | + LTS : 'HH:mm:ss', | |
| 6335 | + L : 'DD-MM-YYYY', | |
| 6336 | + LL : 'D MMMM YYYY', | |
| 6337 | + LLL : 'D MMMM YYYY HH:mm', | |
| 6338 | + LLLL : 'dddd D MMMM YYYY HH:mm' | |
| 6339 | + }, | |
| 6340 | + calendar : { | |
| 6341 | + sameDay: '[hjoed om] LT', | |
| 6342 | + nextDay: '[moarn om] LT', | |
| 6343 | + nextWeek: 'dddd [om] LT', | |
| 6344 | + lastDay: '[juster om] LT', | |
| 6345 | + lastWeek: '[ôfrûne] dddd [om] LT', | |
| 6346 | + sameElse: 'L' | |
| 6347 | + }, | |
| 6348 | + relativeTime : { | |
| 6349 | + future : 'oer %s', | |
| 6350 | + past : '%s lyn', | |
| 6351 | + s : 'in pear sekonden', | |
| 6352 | + m : 'ien minút', | |
| 6353 | + mm : '%d minuten', | |
| 6354 | + h : 'ien oere', | |
| 6355 | + hh : '%d oeren', | |
| 6356 | + d : 'ien dei', | |
| 6357 | + dd : '%d dagen', | |
| 6358 | + M : 'ien moanne', | |
| 6359 | + MM : '%d moannen', | |
| 6360 | + y : 'ien jier', | |
| 6361 | + yy : '%d jierren' | |
| 6362 | + }, | |
| 6363 | + ordinalParse: /\d{1,2}(ste|de)/, | |
| 6364 | + ordinal : function (number) { | |
| 6365 | + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); | |
| 6366 | + }, | |
| 6367 | + week : { | |
| 6368 | + dow : 1, // Monday is the first day of the week. | |
| 6369 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 6370 | + } | |
| 6371 | + }); | |
| 6372 | + | |
| 6373 | + //! moment.js locale configuration | |
| 6374 | + //! locale : great britain scottish gealic (gd) | |
| 6375 | + //! author : Jon Ashdown : https://github.com/jonashdown | |
| 6376 | + | |
| 6377 | + var gd__months = [ | |
| 6378 | + 'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd' | |
| 6379 | + ]; | |
| 6380 | + | |
| 6381 | + var gd__monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh']; | |
| 6382 | + | |
| 6383 | + var gd__weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne']; | |
| 6384 | + | |
| 6385 | + var weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis']; | |
| 6386 | + | |
| 6387 | + var weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa']; | |
| 6388 | + | |
| 6389 | + var gd = moment__default.defineLocale('gd', { | |
| 6390 | + months : gd__months, | |
| 6391 | + monthsShort : gd__monthsShort, | |
| 6392 | + monthsParseExact : true, | |
| 6393 | + weekdays : gd__weekdays, | |
| 6394 | + weekdaysShort : weekdaysShort, | |
| 6395 | + weekdaysMin : weekdaysMin, | |
| 6396 | + longDateFormat : { | |
| 6397 | + LT : 'HH:mm', | |
| 6398 | + LTS : 'HH:mm:ss', | |
| 6399 | + L : 'DD/MM/YYYY', | |
| 6400 | + LL : 'D MMMM YYYY', | |
| 6401 | + LLL : 'D MMMM YYYY HH:mm', | |
| 6402 | + LLLL : 'dddd, D MMMM YYYY HH:mm' | |
| 6403 | + }, | |
| 6404 | + calendar : { | |
| 6405 | + sameDay : '[An-diugh aig] LT', | |
| 6406 | + nextDay : '[A-màireach aig] LT', | |
| 6407 | + nextWeek : 'dddd [aig] LT', | |
| 6408 | + lastDay : '[An-dè aig] LT', | |
| 6409 | + lastWeek : 'dddd [seo chaidh] [aig] LT', | |
| 6410 | + sameElse : 'L' | |
| 6411 | + }, | |
| 6412 | + relativeTime : { | |
| 6413 | + future : 'ann an %s', | |
| 6414 | + past : 'bho chionn %s', | |
| 6415 | + s : 'beagan diogan', | |
| 6416 | + m : 'mionaid', | |
| 6417 | + mm : '%d mionaidean', | |
| 6418 | + h : 'uair', | |
| 6419 | + hh : '%d uairean', | |
| 6420 | + d : 'latha', | |
| 6421 | + dd : '%d latha', | |
| 6422 | + M : 'mìos', | |
| 6423 | + MM : '%d mìosan', | |
| 6424 | + y : 'bliadhna', | |
| 6425 | + yy : '%d bliadhna' | |
| 6426 | + }, | |
| 6427 | + ordinalParse : /\d{1,2}(d|na|mh)/, | |
| 6428 | + ordinal : function (number) { | |
| 6429 | + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; | |
| 6430 | + return number + output; | |
| 6431 | + }, | |
| 6432 | + week : { | |
| 6433 | + dow : 1, // Monday is the first day of the week. | |
| 6434 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 6435 | + } | |
| 6436 | + }); | |
| 6437 | + | |
| 6438 | + //! moment.js locale configuration | |
| 6439 | + //! locale : galician (gl) | |
| 6440 | + //! author : Juan G. Hurtado : https://github.com/juanghurtado | |
| 6441 | + | |
| 6442 | + var gl = moment__default.defineLocale('gl', { | |
| 6443 | + months : 'Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro'.split('_'), | |
| 6444 | + monthsShort : 'Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.'.split('_'), | |
| 6445 | + weekdays : 'Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado'.split('_'), | |
| 6446 | + weekdaysShort : 'Dom._Lun._Mar._Mér._Xov._Ven._Sáb.'.split('_'), | |
| 6447 | + weekdaysMin : 'Do_Lu_Ma_Mé_Xo_Ve_Sá'.split('_'), | |
| 6448 | + longDateFormat : { | |
| 6449 | + LT : 'H:mm', | |
| 6450 | + LTS : 'H:mm:ss', | |
| 6451 | + L : 'DD/MM/YYYY', | |
| 6452 | + LL : 'D MMMM YYYY', | |
| 6453 | + LLL : 'D MMMM YYYY H:mm', | |
| 6454 | + LLLL : 'dddd D MMMM YYYY H:mm' | |
| 6455 | + }, | |
| 6456 | + calendar : { | |
| 6457 | + sameDay : function () { | |
| 6458 | + return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; | |
| 6459 | + }, | |
| 6460 | + nextDay : function () { | |
| 6461 | + return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; | |
| 6462 | + }, | |
| 6463 | + nextWeek : function () { | |
| 6464 | + return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; | |
| 6465 | + }, | |
| 6466 | + lastDay : function () { | |
| 6467 | + return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT'; | |
| 6468 | + }, | |
| 6469 | + lastWeek : function () { | |
| 6470 | + return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; | |
| 6471 | + }, | |
| 6472 | + sameElse : 'L' | |
| 6473 | + }, | |
| 6474 | + relativeTime : { | |
| 6475 | + future : function (str) { | |
| 6476 | + if (str === 'uns segundos') { | |
| 6477 | + return 'nuns segundos'; | |
| 6478 | + } | |
| 6479 | + return 'en ' + str; | |
| 6480 | + }, | |
| 6481 | + past : 'hai %s', | |
| 6482 | + s : 'uns segundos', | |
| 6483 | + m : 'un minuto', | |
| 6484 | + mm : '%d minutos', | |
| 6485 | + h : 'unha hora', | |
| 6486 | + hh : '%d horas', | |
| 6487 | + d : 'un día', | |
| 6488 | + dd : '%d días', | |
| 6489 | + M : 'un mes', | |
| 6490 | + MM : '%d meses', | |
| 6491 | + y : 'un ano', | |
| 6492 | + yy : '%d anos' | |
| 6493 | + }, | |
| 6494 | + ordinalParse : /\d{1,2}º/, | |
| 6495 | + ordinal : '%dº', | |
| 6496 | + week : { | |
| 6497 | + dow : 1, // Monday is the first day of the week. | |
| 6498 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 6499 | + } | |
| 6500 | + }); | |
| 6501 | + | |
| 6502 | + //! moment.js locale configuration | |
| 6503 | + //! locale : Hebrew (he) | |
| 6504 | + //! author : Tomer Cohen : https://github.com/tomer | |
| 6505 | + //! author : Moshe Simantov : https://github.com/DevelopmentIL | |
| 6506 | + //! author : Tal Ater : https://github.com/TalAter | |
| 6507 | + | |
| 6508 | + var he = moment__default.defineLocale('he', { | |
| 6509 | + months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'), | |
| 6510 | + monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'), | |
| 6511 | + weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), | |
| 6512 | + weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), | |
| 6513 | + weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'), | |
| 6514 | + longDateFormat : { | |
| 6515 | + LT : 'HH:mm', | |
| 6516 | + LTS : 'HH:mm:ss', | |
| 6517 | + L : 'DD/MM/YYYY', | |
| 6518 | + LL : 'D [ב]MMMM YYYY', | |
| 6519 | + LLL : 'D [ב]MMMM YYYY HH:mm', | |
| 6520 | + LLLL : 'dddd, D [ב]MMMM YYYY HH:mm', | |
| 6521 | + l : 'D/M/YYYY', | |
| 6522 | + ll : 'D MMM YYYY', | |
| 6523 | + lll : 'D MMM YYYY HH:mm', | |
| 6524 | + llll : 'ddd, D MMM YYYY HH:mm' | |
| 6525 | + }, | |
| 6526 | + calendar : { | |
| 6527 | + sameDay : '[היום ב־]LT', | |
| 6528 | + nextDay : '[מחר ב־]LT', | |
| 6529 | + nextWeek : 'dddd [בשעה] LT', | |
| 6530 | + lastDay : '[אתמול ב־]LT', | |
| 6531 | + lastWeek : '[ביום] dddd [האחרון בשעה] LT', | |
| 6532 | + sameElse : 'L' | |
| 6533 | + }, | |
| 6534 | + relativeTime : { | |
| 6535 | + future : 'בעוד %s', | |
| 6536 | + past : 'לפני %s', | |
| 6537 | + s : 'מספר שניות', | |
| 6538 | + m : 'דקה', | |
| 6539 | + mm : '%d דקות', | |
| 6540 | + h : 'שעה', | |
| 6541 | + hh : function (number) { | |
| 6542 | + if (number === 2) { | |
| 6543 | + return 'שעתיים'; | |
| 6544 | + } | |
| 6545 | + return number + ' שעות'; | |
| 6546 | + }, | |
| 6547 | + d : 'יום', | |
| 6548 | + dd : function (number) { | |
| 6549 | + if (number === 2) { | |
| 6550 | + return 'יומיים'; | |
| 6551 | + } | |
| 6552 | + return number + ' ימים'; | |
| 6553 | + }, | |
| 6554 | + M : 'חודש', | |
| 6555 | + MM : function (number) { | |
| 6556 | + if (number === 2) { | |
| 6557 | + return 'חודשיים'; | |
| 6558 | + } | |
| 6559 | + return number + ' חודשים'; | |
| 6560 | + }, | |
| 6561 | + y : 'שנה', | |
| 6562 | + yy : function (number) { | |
| 6563 | + if (number === 2) { | |
| 6564 | + return 'שנתיים'; | |
| 6565 | + } else if (number % 10 === 0 && number !== 10) { | |
| 6566 | + return number + ' שנה'; | |
| 6567 | + } | |
| 6568 | + return number + ' שנים'; | |
| 6569 | + } | |
| 6570 | + } | |
| 6571 | + }); | |
| 6572 | + | |
| 6573 | + //! moment.js locale configuration | |
| 6574 | + //! locale : hindi (hi) | |
| 6575 | + //! author : Mayank Singhal : https://github.com/mayanksinghal | |
| 6576 | + | |
| 6577 | + var hi__symbolMap = { | |
| 6578 | + '1': '१', | |
| 6579 | + '2': '२', | |
| 6580 | + '3': '३', | |
| 6581 | + '4': '४', | |
| 6582 | + '5': '५', | |
| 6583 | + '6': '६', | |
| 6584 | + '7': '७', | |
| 6585 | + '8': '८', | |
| 6586 | + '9': '९', | |
| 6587 | + '0': '०' | |
| 6588 | + }, | |
| 6589 | + hi__numberMap = { | |
| 6590 | + '१': '1', | |
| 6591 | + '२': '2', | |
| 6592 | + '३': '3', | |
| 6593 | + '४': '4', | |
| 6594 | + '५': '5', | |
| 6595 | + '६': '6', | |
| 6596 | + '७': '7', | |
| 6597 | + '८': '8', | |
| 6598 | + '९': '9', | |
| 6599 | + '०': '0' | |
| 6600 | + }; | |
| 6601 | + | |
| 6602 | + var hi = moment__default.defineLocale('hi', { | |
| 6603 | + months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'), | |
| 6604 | + monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'), | |
| 6605 | + weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), | |
| 6606 | + weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), | |
| 6607 | + weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), | |
| 6608 | + longDateFormat : { | |
| 6609 | + LT : 'A h:mm बजे', | |
| 6610 | + LTS : 'A h:mm:ss बजे', | |
| 6611 | + L : 'DD/MM/YYYY', | |
| 6612 | + LL : 'D MMMM YYYY', | |
| 6613 | + LLL : 'D MMMM YYYY, A h:mm बजे', | |
| 6614 | + LLLL : 'dddd, D MMMM YYYY, A h:mm बजे' | |
| 6615 | + }, | |
| 6616 | + calendar : { | |
| 6617 | + sameDay : '[आज] LT', | |
| 6618 | + nextDay : '[कल] LT', | |
| 6619 | + nextWeek : 'dddd, LT', | |
| 6620 | + lastDay : '[कल] LT', | |
| 6621 | + lastWeek : '[पिछले] dddd, LT', | |
| 6622 | + sameElse : 'L' | |
| 6623 | + }, | |
| 6624 | + relativeTime : { | |
| 6625 | + future : '%s में', | |
| 6626 | + past : '%s पहले', | |
| 6627 | + s : 'कुछ ही क्षण', | |
| 6628 | + m : 'एक मिनट', | |
| 6629 | + mm : '%d मिनट', | |
| 6630 | + h : 'एक घंटा', | |
| 6631 | + hh : '%d घंटे', | |
| 6632 | + d : 'एक दिन', | |
| 6633 | + dd : '%d दिन', | |
| 6634 | + M : 'एक महीने', | |
| 6635 | + MM : '%d महीने', | |
| 6636 | + y : 'एक वर्ष', | |
| 6637 | + yy : '%d वर्ष' | |
| 6638 | + }, | |
| 6639 | + preparse: function (string) { | |
| 6640 | + return string.replace(/[१२३४५६७८९०]/g, function (match) { | |
| 6641 | + return hi__numberMap[match]; | |
| 6642 | + }); | |
| 6643 | + }, | |
| 6644 | + postformat: function (string) { | |
| 6645 | + return string.replace(/\d/g, function (match) { | |
| 6646 | + return hi__symbolMap[match]; | |
| 6647 | + }); | |
| 6648 | + }, | |
| 6649 | + // Hindi notation for meridiems are quite fuzzy in practice. While there exists | |
| 6650 | + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. | |
| 6651 | + meridiemParse: /रात|सुबह|दोपहर|शाम/, | |
| 6652 | + meridiemHour : function (hour, meridiem) { | |
| 6653 | + if (hour === 12) { | |
| 6654 | + hour = 0; | |
| 6655 | + } | |
| 6656 | + if (meridiem === 'रात') { | |
| 6657 | + return hour < 4 ? hour : hour + 12; | |
| 6658 | + } else if (meridiem === 'सुबह') { | |
| 6659 | + return hour; | |
| 6660 | + } else if (meridiem === 'दोपहर') { | |
| 6661 | + return hour >= 10 ? hour : hour + 12; | |
| 6662 | + } else if (meridiem === 'शाम') { | |
| 6663 | + return hour + 12; | |
| 6664 | + } | |
| 6665 | + }, | |
| 6666 | + meridiem : function (hour, minute, isLower) { | |
| 6667 | + if (hour < 4) { | |
| 6668 | + return 'रात'; | |
| 6669 | + } else if (hour < 10) { | |
| 6670 | + return 'सुबह'; | |
| 6671 | + } else if (hour < 17) { | |
| 6672 | + return 'दोपहर'; | |
| 6673 | + } else if (hour < 20) { | |
| 6674 | + return 'शाम'; | |
| 6675 | + } else { | |
| 6676 | + return 'रात'; | |
| 6677 | + } | |
| 6678 | + }, | |
| 6679 | + week : { | |
| 6680 | + dow : 0, // Sunday is the first day of the week. | |
| 6681 | + doy : 6 // The week that contains Jan 1st is the first week of the year. | |
| 6682 | + } | |
| 6683 | + }); | |
| 6684 | + | |
| 6685 | + //! moment.js locale configuration | |
| 6686 | + //! locale : hrvatski (hr) | |
| 6687 | + //! author : Bojan Marković : https://github.com/bmarkovic | |
| 6688 | + | |
| 6689 | + function hr__translate(number, withoutSuffix, key) { | |
| 6690 | + var result = number + ' '; | |
| 6691 | + switch (key) { | |
| 6692 | + case 'm': | |
| 6693 | + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; | |
| 6694 | + case 'mm': | |
| 6695 | + if (number === 1) { | |
| 6696 | + result += 'minuta'; | |
| 6697 | + } else if (number === 2 || number === 3 || number === 4) { | |
| 6698 | + result += 'minute'; | |
| 6699 | + } else { | |
| 6700 | + result += 'minuta'; | |
| 6701 | + } | |
| 6702 | + return result; | |
| 6703 | + case 'h': | |
| 6704 | + return withoutSuffix ? 'jedan sat' : 'jednog sata'; | |
| 6705 | + case 'hh': | |
| 6706 | + if (number === 1) { | |
| 6707 | + result += 'sat'; | |
| 6708 | + } else if (number === 2 || number === 3 || number === 4) { | |
| 6709 | + result += 'sata'; | |
| 6710 | + } else { | |
| 6711 | + result += 'sati'; | |
| 6712 | + } | |
| 6713 | + return result; | |
| 6714 | + case 'dd': | |
| 6715 | + if (number === 1) { | |
| 6716 | + result += 'dan'; | |
| 6717 | + } else { | |
| 6718 | + result += 'dana'; | |
| 6719 | + } | |
| 6720 | + return result; | |
| 6721 | + case 'MM': | |
| 6722 | + if (number === 1) { | |
| 6723 | + result += 'mjesec'; | |
| 6724 | + } else if (number === 2 || number === 3 || number === 4) { | |
| 6725 | + result += 'mjeseca'; | |
| 6726 | + } else { | |
| 6727 | + result += 'mjeseci'; | |
| 6728 | + } | |
| 6729 | + return result; | |
| 6730 | + case 'yy': | |
| 6731 | + if (number === 1) { | |
| 6732 | + result += 'godina'; | |
| 6733 | + } else if (number === 2 || number === 3 || number === 4) { | |
| 6734 | + result += 'godine'; | |
| 6735 | + } else { | |
| 6736 | + result += 'godina'; | |
| 6737 | + } | |
| 6738 | + return result; | |
| 6739 | + } | |
| 6740 | + } | |
| 6741 | + | |
| 6742 | + var hr = moment__default.defineLocale('hr', { | |
| 6743 | + months : { | |
| 6744 | + format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'), | |
| 6745 | + standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_') | |
| 6746 | + }, | |
| 6747 | + monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'), | |
| 6748 | + weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), | |
| 6749 | + weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), | |
| 6750 | + weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), | |
| 6751 | + longDateFormat : { | |
| 6752 | + LT : 'H:mm', | |
| 6753 | + LTS : 'H:mm:ss', | |
| 6754 | + L : 'DD. MM. YYYY', | |
| 6755 | + LL : 'D. MMMM YYYY', | |
| 6756 | + LLL : 'D. MMMM YYYY H:mm', | |
| 6757 | + LLLL : 'dddd, D. MMMM YYYY H:mm' | |
| 6758 | + }, | |
| 6759 | + calendar : { | |
| 6760 | + sameDay : '[danas u] LT', | |
| 6761 | + nextDay : '[sutra u] LT', | |
| 6762 | + nextWeek : function () { | |
| 6763 | + switch (this.day()) { | |
| 6764 | + case 0: | |
| 6765 | + return '[u] [nedjelju] [u] LT'; | |
| 6766 | + case 3: | |
| 6767 | + return '[u] [srijedu] [u] LT'; | |
| 6768 | + case 6: | |
| 6769 | + return '[u] [subotu] [u] LT'; | |
| 6770 | + case 1: | |
| 6771 | + case 2: | |
| 6772 | + case 4: | |
| 6773 | + case 5: | |
| 6774 | + return '[u] dddd [u] LT'; | |
| 6775 | + } | |
| 6776 | + }, | |
| 6777 | + lastDay : '[jučer u] LT', | |
| 6778 | + lastWeek : function () { | |
| 6779 | + switch (this.day()) { | |
| 6780 | + case 0: | |
| 6781 | + case 3: | |
| 6782 | + return '[prošlu] dddd [u] LT'; | |
| 6783 | + case 6: | |
| 6784 | + return '[prošle] [subote] [u] LT'; | |
| 6785 | + case 1: | |
| 6786 | + case 2: | |
| 6787 | + case 4: | |
| 6788 | + case 5: | |
| 6789 | + return '[prošli] dddd [u] LT'; | |
| 6790 | + } | |
| 6791 | + }, | |
| 6792 | + sameElse : 'L' | |
| 6793 | + }, | |
| 6794 | + relativeTime : { | |
| 6795 | + future : 'za %s', | |
| 6796 | + past : 'prije %s', | |
| 6797 | + s : 'par sekundi', | |
| 6798 | + m : hr__translate, | |
| 6799 | + mm : hr__translate, | |
| 6800 | + h : hr__translate, | |
| 6801 | + hh : hr__translate, | |
| 6802 | + d : 'dan', | |
| 6803 | + dd : hr__translate, | |
| 6804 | + M : 'mjesec', | |
| 6805 | + MM : hr__translate, | |
| 6806 | + y : 'godinu', | |
| 6807 | + yy : hr__translate | |
| 6808 | + }, | |
| 6809 | + ordinalParse: /\d{1,2}\./, | |
| 6810 | + ordinal : '%d.', | |
| 6811 | + week : { | |
| 6812 | + dow : 1, // Monday is the first day of the week. | |
| 6813 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 6814 | + } | |
| 6815 | + }); | |
| 6816 | + | |
| 6817 | + //! moment.js locale configuration | |
| 6818 | + //! locale : hungarian (hu) | |
| 6819 | + //! author : Adam Brunner : https://github.com/adambrunner | |
| 6820 | + | |
| 6821 | + var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' '); | |
| 6822 | + function hu__translate(number, withoutSuffix, key, isFuture) { | |
| 6823 | + var num = number, | |
| 6824 | + suffix; | |
| 6825 | + switch (key) { | |
| 6826 | + case 's': | |
| 6827 | + return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce'; | |
| 6828 | + case 'm': | |
| 6829 | + return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); | |
| 6830 | + case 'mm': | |
| 6831 | + return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); | |
| 6832 | + case 'h': | |
| 6833 | + return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); | |
| 6834 | + case 'hh': | |
| 6835 | + return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); | |
| 6836 | + case 'd': | |
| 6837 | + return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); | |
| 6838 | + case 'dd': | |
| 6839 | + return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); | |
| 6840 | + case 'M': | |
| 6841 | + return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); | |
| 6842 | + case 'MM': | |
| 6843 | + return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); | |
| 6844 | + case 'y': | |
| 6845 | + return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); | |
| 6846 | + case 'yy': | |
| 6847 | + return num + (isFuture || withoutSuffix ? ' év' : ' éve'); | |
| 6848 | + } | |
| 6849 | + return ''; | |
| 6850 | + } | |
| 6851 | + function week(isFuture) { | |
| 6852 | + return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]'; | |
| 6853 | + } | |
| 6854 | + | |
| 6855 | + var hu = moment__default.defineLocale('hu', { | |
| 6856 | + months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'), | |
| 6857 | + monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'), | |
| 6858 | + weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), | |
| 6859 | + weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), | |
| 6860 | + weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'), | |
| 6861 | + longDateFormat : { | |
| 6862 | + LT : 'H:mm', | |
| 6863 | + LTS : 'H:mm:ss', | |
| 6864 | + L : 'YYYY.MM.DD.', | |
| 6865 | + LL : 'YYYY. MMMM D.', | |
| 6866 | + LLL : 'YYYY. MMMM D. H:mm', | |
| 6867 | + LLLL : 'YYYY. MMMM D., dddd H:mm' | |
| 6868 | + }, | |
| 6869 | + meridiemParse: /de|du/i, | |
| 6870 | + isPM: function (input) { | |
| 6871 | + return input.charAt(1).toLowerCase() === 'u'; | |
| 6872 | + }, | |
| 6873 | + meridiem : function (hours, minutes, isLower) { | |
| 6874 | + if (hours < 12) { | |
| 6875 | + return isLower === true ? 'de' : 'DE'; | |
| 6876 | + } else { | |
| 6877 | + return isLower === true ? 'du' : 'DU'; | |
| 6878 | + } | |
| 6879 | + }, | |
| 6880 | + calendar : { | |
| 6881 | + sameDay : '[ma] LT[-kor]', | |
| 6882 | + nextDay : '[holnap] LT[-kor]', | |
| 6883 | + nextWeek : function () { | |
| 6884 | + return week.call(this, true); | |
| 6885 | + }, | |
| 6886 | + lastDay : '[tegnap] LT[-kor]', | |
| 6887 | + lastWeek : function () { | |
| 6888 | + return week.call(this, false); | |
| 6889 | + }, | |
| 6890 | + sameElse : 'L' | |
| 6891 | + }, | |
| 6892 | + relativeTime : { | |
| 6893 | + future : '%s múlva', | |
| 6894 | + past : '%s', | |
| 6895 | + s : hu__translate, | |
| 6896 | + m : hu__translate, | |
| 6897 | + mm : hu__translate, | |
| 6898 | + h : hu__translate, | |
| 6899 | + hh : hu__translate, | |
| 6900 | + d : hu__translate, | |
| 6901 | + dd : hu__translate, | |
| 6902 | + M : hu__translate, | |
| 6903 | + MM : hu__translate, | |
| 6904 | + y : hu__translate, | |
| 6905 | + yy : hu__translate | |
| 6906 | + }, | |
| 6907 | + ordinalParse: /\d{1,2}\./, | |
| 6908 | + ordinal : '%d.', | |
| 6909 | + week : { | |
| 6910 | + dow : 1, // Monday is the first day of the week. | |
| 6911 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 6912 | + } | |
| 6913 | + }); | |
| 6914 | + | |
| 6915 | + //! moment.js locale configuration | |
| 6916 | + //! locale : Armenian (hy-am) | |
| 6917 | + //! author : Armendarabyan : https://github.com/armendarabyan | |
| 6918 | + | |
| 6919 | + var hy_am = moment__default.defineLocale('hy-am', { | |
| 6920 | + months : { | |
| 6921 | + format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'), | |
| 6922 | + standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_') | |
| 6923 | + }, | |
| 6924 | + monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), | |
| 6925 | + weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'), | |
| 6926 | + weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), | |
| 6927 | + weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), | |
| 6928 | + longDateFormat : { | |
| 6929 | + LT : 'HH:mm', | |
| 6930 | + LTS : 'HH:mm:ss', | |
| 6931 | + L : 'DD.MM.YYYY', | |
| 6932 | + LL : 'D MMMM YYYY թ.', | |
| 6933 | + LLL : 'D MMMM YYYY թ., HH:mm', | |
| 6934 | + LLLL : 'dddd, D MMMM YYYY թ., HH:mm' | |
| 6935 | + }, | |
| 6936 | + calendar : { | |
| 6937 | + sameDay: '[այսօր] LT', | |
| 6938 | + nextDay: '[վաղը] LT', | |
| 6939 | + lastDay: '[երեկ] LT', | |
| 6940 | + nextWeek: function () { | |
| 6941 | + return 'dddd [օրը ժամը] LT'; | |
| 6942 | + }, | |
| 6943 | + lastWeek: function () { | |
| 6944 | + return '[անցած] dddd [օրը ժամը] LT'; | |
| 6945 | + }, | |
| 6946 | + sameElse: 'L' | |
| 6947 | + }, | |
| 6948 | + relativeTime : { | |
| 6949 | + future : '%s հետո', | |
| 6950 | + past : '%s առաջ', | |
| 6951 | + s : 'մի քանի վայրկյան', | |
| 6952 | + m : 'րոպե', | |
| 6953 | + mm : '%d րոպե', | |
| 6954 | + h : 'ժամ', | |
| 6955 | + hh : '%d ժամ', | |
| 6956 | + d : 'օր', | |
| 6957 | + dd : '%d օր', | |
| 6958 | + M : 'ամիս', | |
| 6959 | + MM : '%d ամիս', | |
| 6960 | + y : 'տարի', | |
| 6961 | + yy : '%d տարի' | |
| 6962 | + }, | |
| 6963 | + meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/, | |
| 6964 | + isPM: function (input) { | |
| 6965 | + return /^(ցերեկվա|երեկոյան)$/.test(input); | |
| 6966 | + }, | |
| 6967 | + meridiem : function (hour) { | |
| 6968 | + if (hour < 4) { | |
| 6969 | + return 'գիշերվա'; | |
| 6970 | + } else if (hour < 12) { | |
| 6971 | + return 'առավոտվա'; | |
| 6972 | + } else if (hour < 17) { | |
| 6973 | + return 'ցերեկվա'; | |
| 6974 | + } else { | |
| 6975 | + return 'երեկոյան'; | |
| 6976 | + } | |
| 6977 | + }, | |
| 6978 | + ordinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, | |
| 6979 | + ordinal: function (number, period) { | |
| 6980 | + switch (period) { | |
| 6981 | + case 'DDD': | |
| 6982 | + case 'w': | |
| 6983 | + case 'W': | |
| 6984 | + case 'DDDo': | |
| 6985 | + if (number === 1) { | |
| 6986 | + return number + '-ին'; | |
| 6987 | + } | |
| 6988 | + return number + '-րդ'; | |
| 6989 | + default: | |
| 6990 | + return number; | |
| 6991 | + } | |
| 6992 | + }, | |
| 6993 | + week : { | |
| 6994 | + dow : 1, // Monday is the first day of the week. | |
| 6995 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 6996 | + } | |
| 6997 | + }); | |
| 6998 | + | |
| 6999 | + //! moment.js locale configuration | |
| 7000 | + //! locale : Bahasa Indonesia (id) | |
| 7001 | + //! author : Mohammad Satrio Utomo : https://github.com/tyok | |
| 7002 | + //! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan | |
| 7003 | + | |
| 7004 | + var id = moment__default.defineLocale('id', { | |
| 7005 | + months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'), | |
| 7006 | + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'), | |
| 7007 | + weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), | |
| 7008 | + weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), | |
| 7009 | + weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), | |
| 7010 | + longDateFormat : { | |
| 7011 | + LT : 'HH.mm', | |
| 7012 | + LTS : 'HH.mm.ss', | |
| 7013 | + L : 'DD/MM/YYYY', | |
| 7014 | + LL : 'D MMMM YYYY', | |
| 7015 | + LLL : 'D MMMM YYYY [pukul] HH.mm', | |
| 7016 | + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' | |
| 7017 | + }, | |
| 7018 | + meridiemParse: /pagi|siang|sore|malam/, | |
| 7019 | + meridiemHour : function (hour, meridiem) { | |
| 7020 | + if (hour === 12) { | |
| 7021 | + hour = 0; | |
| 7022 | + } | |
| 7023 | + if (meridiem === 'pagi') { | |
| 7024 | + return hour; | |
| 7025 | + } else if (meridiem === 'siang') { | |
| 7026 | + return hour >= 11 ? hour : hour + 12; | |
| 7027 | + } else if (meridiem === 'sore' || meridiem === 'malam') { | |
| 7028 | + return hour + 12; | |
| 7029 | + } | |
| 7030 | + }, | |
| 7031 | + meridiem : function (hours, minutes, isLower) { | |
| 7032 | + if (hours < 11) { | |
| 7033 | + return 'pagi'; | |
| 7034 | + } else if (hours < 15) { | |
| 7035 | + return 'siang'; | |
| 7036 | + } else if (hours < 19) { | |
| 7037 | + return 'sore'; | |
| 7038 | + } else { | |
| 7039 | + return 'malam'; | |
| 7040 | + } | |
| 7041 | + }, | |
| 7042 | + calendar : { | |
| 7043 | + sameDay : '[Hari ini pukul] LT', | |
| 7044 | + nextDay : '[Besok pukul] LT', | |
| 7045 | + nextWeek : 'dddd [pukul] LT', | |
| 7046 | + lastDay : '[Kemarin pukul] LT', | |
| 7047 | + lastWeek : 'dddd [lalu pukul] LT', | |
| 7048 | + sameElse : 'L' | |
| 7049 | + }, | |
| 7050 | + relativeTime : { | |
| 7051 | + future : 'dalam %s', | |
| 7052 | + past : '%s yang lalu', | |
| 7053 | + s : 'beberapa detik', | |
| 7054 | + m : 'semenit', | |
| 7055 | + mm : '%d menit', | |
| 7056 | + h : 'sejam', | |
| 7057 | + hh : '%d jam', | |
| 7058 | + d : 'sehari', | |
| 7059 | + dd : '%d hari', | |
| 7060 | + M : 'sebulan', | |
| 7061 | + MM : '%d bulan', | |
| 7062 | + y : 'setahun', | |
| 7063 | + yy : '%d tahun' | |
| 7064 | + }, | |
| 7065 | + week : { | |
| 7066 | + dow : 1, // Monday is the first day of the week. | |
| 7067 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 7068 | + } | |
| 7069 | + }); | |
| 7070 | + | |
| 7071 | + //! moment.js locale configuration | |
| 7072 | + //! locale : icelandic (is) | |
| 7073 | + //! author : Hinrik Örn Sigurðsson : https://github.com/hinrik | |
| 7074 | + | |
| 7075 | + function is__plural(n) { | |
| 7076 | + if (n % 100 === 11) { | |
| 7077 | + return true; | |
| 7078 | + } else if (n % 10 === 1) { | |
| 7079 | + return false; | |
| 7080 | + } | |
| 7081 | + return true; | |
| 7082 | + } | |
| 7083 | + function is__translate(number, withoutSuffix, key, isFuture) { | |
| 7084 | + var result = number + ' '; | |
| 7085 | + switch (key) { | |
| 7086 | + case 's': | |
| 7087 | + return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum'; | |
| 7088 | + case 'm': | |
| 7089 | + return withoutSuffix ? 'mínúta' : 'mínútu'; | |
| 7090 | + case 'mm': | |
| 7091 | + if (is__plural(number)) { | |
| 7092 | + return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum'); | |
| 7093 | + } else if (withoutSuffix) { | |
| 7094 | + return result + 'mínúta'; | |
| 7095 | + } | |
| 7096 | + return result + 'mínútu'; | |
| 7097 | + case 'hh': | |
| 7098 | + if (is__plural(number)) { | |
| 7099 | + return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum'); | |
| 7100 | + } | |
| 7101 | + return result + 'klukkustund'; | |
| 7102 | + case 'd': | |
| 7103 | + if (withoutSuffix) { | |
| 7104 | + return 'dagur'; | |
| 7105 | + } | |
| 7106 | + return isFuture ? 'dag' : 'degi'; | |
| 7107 | + case 'dd': | |
| 7108 | + if (is__plural(number)) { | |
| 7109 | + if (withoutSuffix) { | |
| 7110 | + return result + 'dagar'; | |
| 7111 | + } | |
| 7112 | + return result + (isFuture ? 'daga' : 'dögum'); | |
| 7113 | + } else if (withoutSuffix) { | |
| 7114 | + return result + 'dagur'; | |
| 7115 | + } | |
| 7116 | + return result + (isFuture ? 'dag' : 'degi'); | |
| 7117 | + case 'M': | |
| 7118 | + if (withoutSuffix) { | |
| 7119 | + return 'mánuður'; | |
| 7120 | + } | |
| 7121 | + return isFuture ? 'mánuð' : 'mánuði'; | |
| 7122 | + case 'MM': | |
| 7123 | + if (is__plural(number)) { | |
| 7124 | + if (withoutSuffix) { | |
| 7125 | + return result + 'mánuðir'; | |
| 7126 | + } | |
| 7127 | + return result + (isFuture ? 'mánuði' : 'mánuðum'); | |
| 7128 | + } else if (withoutSuffix) { | |
| 7129 | + return result + 'mánuður'; | |
| 7130 | + } | |
| 7131 | + return result + (isFuture ? 'mánuð' : 'mánuði'); | |
| 7132 | + case 'y': | |
| 7133 | + return withoutSuffix || isFuture ? 'ár' : 'ári'; | |
| 7134 | + case 'yy': | |
| 7135 | + if (is__plural(number)) { | |
| 7136 | + return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); | |
| 7137 | + } | |
| 7138 | + return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); | |
| 7139 | + } | |
| 7140 | + } | |
| 7141 | + | |
| 7142 | + var is = moment__default.defineLocale('is', { | |
| 7143 | + months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'), | |
| 7144 | + monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), | |
| 7145 | + weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'), | |
| 7146 | + weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'), | |
| 7147 | + weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), | |
| 7148 | + longDateFormat : { | |
| 7149 | + LT : 'H:mm', | |
| 7150 | + LTS : 'H:mm:ss', | |
| 7151 | + L : 'DD/MM/YYYY', | |
| 7152 | + LL : 'D. MMMM YYYY', | |
| 7153 | + LLL : 'D. MMMM YYYY [kl.] H:mm', | |
| 7154 | + LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm' | |
| 7155 | + }, | |
| 7156 | + calendar : { | |
| 7157 | + sameDay : '[í dag kl.] LT', | |
| 7158 | + nextDay : '[á morgun kl.] LT', | |
| 7159 | + nextWeek : 'dddd [kl.] LT', | |
| 7160 | + lastDay : '[í gær kl.] LT', | |
| 7161 | + lastWeek : '[síðasta] dddd [kl.] LT', | |
| 7162 | + sameElse : 'L' | |
| 7163 | + }, | |
| 7164 | + relativeTime : { | |
| 7165 | + future : 'eftir %s', | |
| 7166 | + past : 'fyrir %s síðan', | |
| 7167 | + s : is__translate, | |
| 7168 | + m : is__translate, | |
| 7169 | + mm : is__translate, | |
| 7170 | + h : 'klukkustund', | |
| 7171 | + hh : is__translate, | |
| 7172 | + d : is__translate, | |
| 7173 | + dd : is__translate, | |
| 7174 | + M : is__translate, | |
| 7175 | + MM : is__translate, | |
| 7176 | + y : is__translate, | |
| 7177 | + yy : is__translate | |
| 7178 | + }, | |
| 7179 | + ordinalParse: /\d{1,2}\./, | |
| 7180 | + ordinal : '%d.', | |
| 7181 | + week : { | |
| 7182 | + dow : 1, // Monday is the first day of the week. | |
| 7183 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 7184 | + } | |
| 7185 | + }); | |
| 7186 | + | |
| 7187 | + //! moment.js locale configuration | |
| 7188 | + //! locale : italian (it) | |
| 7189 | + //! author : Lorenzo : https://github.com/aliem | |
| 7190 | + //! author: Mattia Larentis: https://github.com/nostalgiaz | |
| 7191 | + | |
| 7192 | + var it = moment__default.defineLocale('it', { | |
| 7193 | + months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), | |
| 7194 | + monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), | |
| 7195 | + weekdays : 'Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato'.split('_'), | |
| 7196 | + weekdaysShort : 'Dom_Lun_Mar_Mer_Gio_Ven_Sab'.split('_'), | |
| 7197 | + weekdaysMin : 'Do_Lu_Ma_Me_Gi_Ve_Sa'.split('_'), | |
| 7198 | + longDateFormat : { | |
| 7199 | + LT : 'HH:mm', | |
| 7200 | + LTS : 'HH:mm:ss', | |
| 7201 | + L : 'DD/MM/YYYY', | |
| 7202 | + LL : 'D MMMM YYYY', | |
| 7203 | + LLL : 'D MMMM YYYY HH:mm', | |
| 7204 | + LLLL : 'dddd, D MMMM YYYY HH:mm' | |
| 7205 | + }, | |
| 7206 | + calendar : { | |
| 7207 | + sameDay: '[Oggi alle] LT', | |
| 7208 | + nextDay: '[Domani alle] LT', | |
| 7209 | + nextWeek: 'dddd [alle] LT', | |
| 7210 | + lastDay: '[Ieri alle] LT', | |
| 7211 | + lastWeek: function () { | |
| 7212 | + switch (this.day()) { | |
| 7213 | + case 0: | |
| 7214 | + return '[la scorsa] dddd [alle] LT'; | |
| 7215 | + default: | |
| 7216 | + return '[lo scorso] dddd [alle] LT'; | |
| 7217 | + } | |
| 7218 | + }, | |
| 7219 | + sameElse: 'L' | |
| 7220 | + }, | |
| 7221 | + relativeTime : { | |
| 7222 | + future : function (s) { | |
| 7223 | + return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; | |
| 7224 | + }, | |
| 7225 | + past : '%s fa', | |
| 7226 | + s : 'alcuni secondi', | |
| 7227 | + m : 'un minuto', | |
| 7228 | + mm : '%d minuti', | |
| 7229 | + h : 'un\'ora', | |
| 7230 | + hh : '%d ore', | |
| 7231 | + d : 'un giorno', | |
| 7232 | + dd : '%d giorni', | |
| 7233 | + M : 'un mese', | |
| 7234 | + MM : '%d mesi', | |
| 7235 | + y : 'un anno', | |
| 7236 | + yy : '%d anni' | |
| 7237 | + }, | |
| 7238 | + ordinalParse : /\d{1,2}º/, | |
| 7239 | + ordinal: '%dº', | |
| 7240 | + week : { | |
| 7241 | + dow : 1, // Monday is the first day of the week. | |
| 7242 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 7243 | + } | |
| 7244 | + }); | |
| 7245 | + | |
| 7246 | + //! moment.js locale configuration | |
| 7247 | + //! locale : japanese (ja) | |
| 7248 | + //! author : LI Long : https://github.com/baryon | |
| 7249 | + | |
| 7250 | + var ja = moment__default.defineLocale('ja', { | |
| 7251 | + months : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), | |
| 7252 | + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), | |
| 7253 | + weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), | |
| 7254 | + weekdaysShort : '日_月_火_水_木_金_土'.split('_'), | |
| 7255 | + weekdaysMin : '日_月_火_水_木_金_土'.split('_'), | |
| 7256 | + longDateFormat : { | |
| 7257 | + LT : 'Ah時m分', | |
| 7258 | + LTS : 'Ah時m分s秒', | |
| 7259 | + L : 'YYYY/MM/DD', | |
| 7260 | + LL : 'YYYY年M月D日', | |
| 7261 | + LLL : 'YYYY年M月D日Ah時m分', | |
| 7262 | + LLLL : 'YYYY年M月D日Ah時m分 dddd' | |
| 7263 | + }, | |
| 7264 | + meridiemParse: /午前|午後/i, | |
| 7265 | + isPM : function (input) { | |
| 7266 | + return input === '午後'; | |
| 7267 | + }, | |
| 7268 | + meridiem : function (hour, minute, isLower) { | |
| 7269 | + if (hour < 12) { | |
| 7270 | + return '午前'; | |
| 7271 | + } else { | |
| 7272 | + return '午後'; | |
| 7273 | + } | |
| 7274 | + }, | |
| 7275 | + calendar : { | |
| 7276 | + sameDay : '[今日] LT', | |
| 7277 | + nextDay : '[明日] LT', | |
| 7278 | + nextWeek : '[来週]dddd LT', | |
| 7279 | + lastDay : '[昨日] LT', | |
| 7280 | + lastWeek : '[前週]dddd LT', | |
| 7281 | + sameElse : 'L' | |
| 7282 | + }, | |
| 7283 | + relativeTime : { | |
| 7284 | + future : '%s後', | |
| 7285 | + past : '%s前', | |
| 7286 | + s : '数秒', | |
| 7287 | + m : '1分', | |
| 7288 | + mm : '%d分', | |
| 7289 | + h : '1時間', | |
| 7290 | + hh : '%d時間', | |
| 7291 | + d : '1日', | |
| 7292 | + dd : '%d日', | |
| 7293 | + M : '1ヶ月', | |
| 7294 | + MM : '%dヶ月', | |
| 7295 | + y : '1年', | |
| 7296 | + yy : '%d年' | |
| 7297 | + } | |
| 7298 | + }); | |
| 7299 | + | |
| 7300 | + //! moment.js locale configuration | |
| 7301 | + //! locale : Boso Jowo (jv) | |
| 7302 | + //! author : Rony Lantip : https://github.com/lantip | |
| 7303 | + //! reference: http://jv.wikipedia.org/wiki/Basa_Jawa | |
| 7304 | + | |
| 7305 | + var jv = moment__default.defineLocale('jv', { | |
| 7306 | + months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'), | |
| 7307 | + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), | |
| 7308 | + weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), | |
| 7309 | + weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), | |
| 7310 | + weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), | |
| 7311 | + longDateFormat : { | |
| 7312 | + LT : 'HH.mm', | |
| 7313 | + LTS : 'HH.mm.ss', | |
| 7314 | + L : 'DD/MM/YYYY', | |
| 7315 | + LL : 'D MMMM YYYY', | |
| 7316 | + LLL : 'D MMMM YYYY [pukul] HH.mm', | |
| 7317 | + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' | |
| 7318 | + }, | |
| 7319 | + meridiemParse: /enjing|siyang|sonten|ndalu/, | |
| 7320 | + meridiemHour : function (hour, meridiem) { | |
| 7321 | + if (hour === 12) { | |
| 7322 | + hour = 0; | |
| 7323 | + } | |
| 7324 | + if (meridiem === 'enjing') { | |
| 7325 | + return hour; | |
| 7326 | + } else if (meridiem === 'siyang') { | |
| 7327 | + return hour >= 11 ? hour : hour + 12; | |
| 7328 | + } else if (meridiem === 'sonten' || meridiem === 'ndalu') { | |
| 7329 | + return hour + 12; | |
| 7330 | + } | |
| 7331 | + }, | |
| 7332 | + meridiem : function (hours, minutes, isLower) { | |
| 7333 | + if (hours < 11) { | |
| 7334 | + return 'enjing'; | |
| 7335 | + } else if (hours < 15) { | |
| 7336 | + return 'siyang'; | |
| 7337 | + } else if (hours < 19) { | |
| 7338 | + return 'sonten'; | |
| 7339 | + } else { | |
| 7340 | + return 'ndalu'; | |
| 7341 | + } | |
| 7342 | + }, | |
| 7343 | + calendar : { | |
| 7344 | + sameDay : '[Dinten puniko pukul] LT', | |
| 7345 | + nextDay : '[Mbenjang pukul] LT', | |
| 7346 | + nextWeek : 'dddd [pukul] LT', | |
| 7347 | + lastDay : '[Kala wingi pukul] LT', | |
| 7348 | + lastWeek : 'dddd [kepengker pukul] LT', | |
| 7349 | + sameElse : 'L' | |
| 7350 | + }, | |
| 7351 | + relativeTime : { | |
| 7352 | + future : 'wonten ing %s', | |
| 7353 | + past : '%s ingkang kepengker', | |
| 7354 | + s : 'sawetawis detik', | |
| 7355 | + m : 'setunggal menit', | |
| 7356 | + mm : '%d menit', | |
| 7357 | + h : 'setunggal jam', | |
| 7358 | + hh : '%d jam', | |
| 7359 | + d : 'sedinten', | |
| 7360 | + dd : '%d dinten', | |
| 7361 | + M : 'sewulan', | |
| 7362 | + MM : '%d wulan', | |
| 7363 | + y : 'setaun', | |
| 7364 | + yy : '%d taun' | |
| 7365 | + }, | |
| 7366 | + week : { | |
| 7367 | + dow : 1, // Monday is the first day of the week. | |
| 7368 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 7369 | + } | |
| 7370 | + }); | |
| 7371 | + | |
| 7372 | + //! moment.js locale configuration | |
| 7373 | + //! locale : Georgian (ka) | |
| 7374 | + //! author : Irakli Janiashvili : https://github.com/irakli-janiashvili | |
| 7375 | + | |
| 7376 | + var ka = moment__default.defineLocale('ka', { | |
| 7377 | + months : { | |
| 7378 | + standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'), | |
| 7379 | + format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_') | |
| 7380 | + }, | |
| 7381 | + monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), | |
| 7382 | + weekdays : { | |
| 7383 | + standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'), | |
| 7384 | + format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'), | |
| 7385 | + isFormat: /(წინა|შემდეგ)/ | |
| 7386 | + }, | |
| 7387 | + weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), | |
| 7388 | + weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), | |
| 7389 | + longDateFormat : { | |
| 7390 | + LT : 'h:mm A', | |
| 7391 | + LTS : 'h:mm:ss A', | |
| 7392 | + L : 'DD/MM/YYYY', | |
| 7393 | + LL : 'D MMMM YYYY', | |
| 7394 | + LLL : 'D MMMM YYYY h:mm A', | |
| 7395 | + LLLL : 'dddd, D MMMM YYYY h:mm A' | |
| 7396 | + }, | |
| 7397 | + calendar : { | |
| 7398 | + sameDay : '[დღეს] LT[-ზე]', | |
| 7399 | + nextDay : '[ხვალ] LT[-ზე]', | |
| 7400 | + lastDay : '[გუშინ] LT[-ზე]', | |
| 7401 | + nextWeek : '[შემდეგ] dddd LT[-ზე]', | |
| 7402 | + lastWeek : '[წინა] dddd LT-ზე', | |
| 7403 | + sameElse : 'L' | |
| 7404 | + }, | |
| 7405 | + relativeTime : { | |
| 7406 | + future : function (s) { | |
| 7407 | + return (/(წამი|წუთი|საათი|წელი)/).test(s) ? | |
| 7408 | + s.replace(/ი$/, 'ში') : | |
| 7409 | + s + 'ში'; | |
| 7410 | + }, | |
| 7411 | + past : function (s) { | |
| 7412 | + if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) { | |
| 7413 | + return s.replace(/(ი|ე)$/, 'ის წინ'); | |
| 7414 | + } | |
| 7415 | + if ((/წელი/).test(s)) { | |
| 7416 | + return s.replace(/წელი$/, 'წლის წინ'); | |
| 7417 | + } | |
| 7418 | + }, | |
| 7419 | + s : 'რამდენიმე წამი', | |
| 7420 | + m : 'წუთი', | |
| 7421 | + mm : '%d წუთი', | |
| 7422 | + h : 'საათი', | |
| 7423 | + hh : '%d საათი', | |
| 7424 | + d : 'დღე', | |
| 7425 | + dd : '%d დღე', | |
| 7426 | + M : 'თვე', | |
| 7427 | + MM : '%d თვე', | |
| 7428 | + y : 'წელი', | |
| 7429 | + yy : '%d წელი' | |
| 7430 | + }, | |
| 7431 | + ordinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, | |
| 7432 | + ordinal : function (number) { | |
| 7433 | + if (number === 0) { | |
| 7434 | + return number; | |
| 7435 | + } | |
| 7436 | + if (number === 1) { | |
| 7437 | + return number + '-ლი'; | |
| 7438 | + } | |
| 7439 | + if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) { | |
| 7440 | + return 'მე-' + number; | |
| 7441 | + } | |
| 7442 | + return number + '-ე'; | |
| 7443 | + }, | |
| 7444 | + week : { | |
| 7445 | + dow : 1, | |
| 7446 | + doy : 7 | |
| 7447 | + } | |
| 7448 | + }); | |
| 7449 | + | |
| 7450 | + //! moment.js locale configuration | |
| 7451 | + //! locale : kazakh (kk) | |
| 7452 | + //! authors : Nurlan Rakhimzhanov : https://github.com/nurlan | |
| 7453 | + | |
| 7454 | + var kk__suffixes = { | |
| 7455 | + 0: '-ші', | |
| 7456 | + 1: '-ші', | |
| 7457 | + 2: '-ші', | |
| 7458 | + 3: '-ші', | |
| 7459 | + 4: '-ші', | |
| 7460 | + 5: '-ші', | |
| 7461 | + 6: '-шы', | |
| 7462 | + 7: '-ші', | |
| 7463 | + 8: '-ші', | |
| 7464 | + 9: '-шы', | |
| 7465 | + 10: '-шы', | |
| 7466 | + 20: '-шы', | |
| 7467 | + 30: '-шы', | |
| 7468 | + 40: '-шы', | |
| 7469 | + 50: '-ші', | |
| 7470 | + 60: '-шы', | |
| 7471 | + 70: '-ші', | |
| 7472 | + 80: '-ші', | |
| 7473 | + 90: '-шы', | |
| 7474 | + 100: '-ші' | |
| 7475 | + }; | |
| 7476 | + | |
| 7477 | + var kk = moment__default.defineLocale('kk', { | |
| 7478 | + months : 'Қаңтар_Ақпан_Наурыз_Сәуір_Мамыр_Маусым_Шілде_Тамыз_Қыркүйек_Қазан_Қараша_Желтоқсан'.split('_'), | |
| 7479 | + monthsShort : 'Қаң_Ақп_Нау_Сәу_Мам_Мау_Шіл_Там_Қыр_Қаз_Қар_Жел'.split('_'), | |
| 7480 | + weekdays : 'Жексенбі_Дүйсенбі_Сейсенбі_Сәрсенбі_Бейсенбі_Жұма_Сенбі'.split('_'), | |
| 7481 | + weekdaysShort : 'Жек_Дүй_Сей_Сәр_Бей_Жұм_Сен'.split('_'), | |
| 7482 | + weekdaysMin : 'Жк_Дй_Сй_Ср_Бй_Жм_Сн'.split('_'), | |
| 7483 | + longDateFormat : { | |
| 7484 | + LT : 'HH:mm', | |
| 7485 | + LTS : 'HH:mm:ss', | |
| 7486 | + L : 'DD.MM.YYYY', | |
| 7487 | + LL : 'D MMMM YYYY', | |
| 7488 | + LLL : 'D MMMM YYYY HH:mm', | |
| 7489 | + LLLL : 'dddd, D MMMM YYYY HH:mm' | |
| 7490 | + }, | |
| 7491 | + calendar : { | |
| 7492 | + sameDay : '[Бүгін сағат] LT', | |
| 7493 | + nextDay : '[Ертең сағат] LT', | |
| 7494 | + nextWeek : 'dddd [сағат] LT', | |
| 7495 | + lastDay : '[Кеше сағат] LT', | |
| 7496 | + lastWeek : '[Өткен аптаның] dddd [сағат] LT', | |
| 7497 | + sameElse : 'L' | |
| 7498 | + }, | |
| 7499 | + relativeTime : { | |
| 7500 | + future : '%s ішінде', | |
| 7501 | + past : '%s бұрын', | |
| 7502 | + s : 'бірнеше секунд', | |
| 7503 | + m : 'бір минут', | |
| 7504 | + mm : '%d минут', | |
| 7505 | + h : 'бір сағат', | |
| 7506 | + hh : '%d сағат', | |
| 7507 | + d : 'бір күн', | |
| 7508 | + dd : '%d күн', | |
| 7509 | + M : 'бір ай', | |
| 7510 | + MM : '%d ай', | |
| 7511 | + y : 'бір жыл', | |
| 7512 | + yy : '%d жыл' | |
| 7513 | + }, | |
| 7514 | + ordinalParse: /\d{1,2}-(ші|шы)/, | |
| 7515 | + ordinal : function (number) { | |
| 7516 | + var a = number % 10, | |
| 7517 | + b = number >= 100 ? 100 : null; | |
| 7518 | + return number + (kk__suffixes[number] || kk__suffixes[a] || kk__suffixes[b]); | |
| 7519 | + }, | |
| 7520 | + week : { | |
| 7521 | + dow : 1, // Monday is the first day of the week. | |
| 7522 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 7523 | + } | |
| 7524 | + }); | |
| 7525 | + | |
| 7526 | + //! moment.js locale configuration | |
| 7527 | + //! locale : khmer (km) | |
| 7528 | + //! author : Kruy Vanna : https://github.com/kruyvanna | |
| 7529 | + | |
| 7530 | + var km = moment__default.defineLocale('km', { | |
| 7531 | + months: 'មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'), | |
| 7532 | + monthsShort: 'មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'), | |
| 7533 | + weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), | |
| 7534 | + weekdaysShort: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), | |
| 7535 | + weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), | |
| 7536 | + longDateFormat: { | |
| 7537 | + LT: 'HH:mm', | |
| 7538 | + LTS : 'HH:mm:ss', | |
| 7539 | + L: 'DD/MM/YYYY', | |
| 7540 | + LL: 'D MMMM YYYY', | |
| 7541 | + LLL: 'D MMMM YYYY HH:mm', | |
| 7542 | + LLLL: 'dddd, D MMMM YYYY HH:mm' | |
| 7543 | + }, | |
| 7544 | + calendar: { | |
| 7545 | + sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', | |
| 7546 | + nextDay: '[ស្អែក ម៉ោង] LT', | |
| 7547 | + nextWeek: 'dddd [ម៉ោង] LT', | |
| 7548 | + lastDay: '[ម្សិលមិញ ម៉ោង] LT', | |
| 7549 | + lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', | |
| 7550 | + sameElse: 'L' | |
| 7551 | + }, | |
| 7552 | + relativeTime: { | |
| 7553 | + future: '%sទៀត', | |
| 7554 | + past: '%sមុន', | |
| 7555 | + s: 'ប៉ុន្មានវិនាទី', | |
| 7556 | + m: 'មួយនាទី', | |
| 7557 | + mm: '%d នាទី', | |
| 7558 | + h: 'មួយម៉ោង', | |
| 7559 | + hh: '%d ម៉ោង', | |
| 7560 | + d: 'មួយថ្ងៃ', | |
| 7561 | + dd: '%d ថ្ងៃ', | |
| 7562 | + M: 'មួយខែ', | |
| 7563 | + MM: '%d ខែ', | |
| 7564 | + y: 'មួយឆ្នាំ', | |
| 7565 | + yy: '%d ឆ្នាំ' | |
| 7566 | + }, | |
| 7567 | + week: { | |
| 7568 | + dow: 1, // Monday is the first day of the week. | |
| 7569 | + doy: 4 // The week that contains Jan 4th is the first week of the year. | |
| 7570 | + } | |
| 7571 | + }); | |
| 7572 | + | |
| 7573 | + //! moment.js locale configuration | |
| 7574 | + //! locale : korean (ko) | |
| 7575 | + //! | |
| 7576 | + //! authors | |
| 7577 | + //! | |
| 7578 | + //! - Kyungwook, Park : https://github.com/kyungw00k | |
| 7579 | + //! - Jeeeyul Lee <jeeeyul@gmail.com> | |
| 7580 | + | |
| 7581 | + var ko = moment__default.defineLocale('ko', { | |
| 7582 | + months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), | |
| 7583 | + monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), | |
| 7584 | + weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), | |
| 7585 | + weekdaysShort : '일_월_화_수_목_금_토'.split('_'), | |
| 7586 | + weekdaysMin : '일_월_화_수_목_금_토'.split('_'), | |
| 7587 | + longDateFormat : { | |
| 7588 | + LT : 'A h시 m분', | |
| 7589 | + LTS : 'A h시 m분 s초', | |
| 7590 | + L : 'YYYY.MM.DD', | |
| 7591 | + LL : 'YYYY년 MMMM D일', | |
| 7592 | + LLL : 'YYYY년 MMMM D일 A h시 m분', | |
| 7593 | + LLLL : 'YYYY년 MMMM D일 dddd A h시 m분' | |
| 7594 | + }, | |
| 7595 | + calendar : { | |
| 7596 | + sameDay : '오늘 LT', | |
| 7597 | + nextDay : '내일 LT', | |
| 7598 | + nextWeek : 'dddd LT', | |
| 7599 | + lastDay : '어제 LT', | |
| 7600 | + lastWeek : '지난주 dddd LT', | |
| 7601 | + sameElse : 'L' | |
| 7602 | + }, | |
| 7603 | + relativeTime : { | |
| 7604 | + future : '%s 후', | |
| 7605 | + past : '%s 전', | |
| 7606 | + s : '몇초', | |
| 7607 | + ss : '%d초', | |
| 7608 | + m : '일분', | |
| 7609 | + mm : '%d분', | |
| 7610 | + h : '한시간', | |
| 7611 | + hh : '%d시간', | |
| 7612 | + d : '하루', | |
| 7613 | + dd : '%d일', | |
| 7614 | + M : '한달', | |
| 7615 | + MM : '%d달', | |
| 7616 | + y : '일년', | |
| 7617 | + yy : '%d년' | |
| 7618 | + }, | |
| 7619 | + ordinalParse : /\d{1,2}일/, | |
| 7620 | + ordinal : '%d일', | |
| 7621 | + meridiemParse : /오전|오후/, | |
| 7622 | + isPM : function (token) { | |
| 7623 | + return token === '오후'; | |
| 7624 | + }, | |
| 7625 | + meridiem : function (hour, minute, isUpper) { | |
| 7626 | + return hour < 12 ? '오전' : '오후'; | |
| 7627 | + } | |
| 7628 | + }); | |
| 7629 | + | |
| 7630 | + //! moment.js locale configuration | |
| 7631 | + //! locale : Luxembourgish (lb) | |
| 7632 | + //! author : mweimerskirch : https://github.com/mweimerskirch, David Raison : https://github.com/kwisatz | |
| 7633 | + | |
| 7634 | + function lb__processRelativeTime(number, withoutSuffix, key, isFuture) { | |
| 7635 | + var format = { | |
| 7636 | + 'm': ['eng Minutt', 'enger Minutt'], | |
| 7637 | + 'h': ['eng Stonn', 'enger Stonn'], | |
| 7638 | + 'd': ['een Dag', 'engem Dag'], | |
| 7639 | + 'M': ['ee Mount', 'engem Mount'], | |
| 7640 | + 'y': ['ee Joer', 'engem Joer'] | |
| 7641 | + }; | |
| 7642 | + return withoutSuffix ? format[key][0] : format[key][1]; | |
| 7643 | + } | |
| 7644 | + function processFutureTime(string) { | |
| 7645 | + var number = string.substr(0, string.indexOf(' ')); | |
| 7646 | + if (eifelerRegelAppliesToNumber(number)) { | |
| 7647 | + return 'a ' + string; | |
| 7648 | + } | |
| 7649 | + return 'an ' + string; | |
| 7650 | + } | |
| 7651 | + function processPastTime(string) { | |
| 7652 | + var number = string.substr(0, string.indexOf(' ')); | |
| 7653 | + if (eifelerRegelAppliesToNumber(number)) { | |
| 7654 | + return 'viru ' + string; | |
| 7655 | + } | |
| 7656 | + return 'virun ' + string; | |
| 7657 | + } | |
| 7658 | + /** | |
| 7659 | + * Returns true if the word before the given number loses the '-n' ending. | |
| 7660 | + * e.g. 'an 10 Deeg' but 'a 5 Deeg' | |
| 7661 | + * | |
| 7662 | + * @param number {integer} | |
| 7663 | + * @returns {boolean} | |
| 7664 | + */ | |
| 7665 | + function eifelerRegelAppliesToNumber(number) { | |
| 7666 | + number = parseInt(number, 10); | |
| 7667 | + if (isNaN(number)) { | |
| 7668 | + return false; | |
| 7669 | + } | |
| 7670 | + if (number < 0) { | |
| 7671 | + // Negative Number --> always true | |
| 7672 | + return true; | |
| 7673 | + } else if (number < 10) { | |
| 7674 | + // Only 1 digit | |
| 7675 | + if (4 <= number && number <= 7) { | |
| 7676 | + return true; | |
| 7677 | + } | |
| 7678 | + return false; | |
| 7679 | + } else if (number < 100) { | |
| 7680 | + // 2 digits | |
| 7681 | + var lastDigit = number % 10, firstDigit = number / 10; | |
| 7682 | + if (lastDigit === 0) { | |
| 7683 | + return eifelerRegelAppliesToNumber(firstDigit); | |
| 7684 | + } | |
| 7685 | + return eifelerRegelAppliesToNumber(lastDigit); | |
| 7686 | + } else if (number < 10000) { | |
| 7687 | + // 3 or 4 digits --> recursively check first digit | |
| 7688 | + while (number >= 10) { | |
| 7689 | + number = number / 10; | |
| 7690 | + } | |
| 7691 | + return eifelerRegelAppliesToNumber(number); | |
| 7692 | + } else { | |
| 7693 | + // Anything larger than 4 digits: recursively check first n-3 digits | |
| 7694 | + number = number / 1000; | |
| 7695 | + return eifelerRegelAppliesToNumber(number); | |
| 7696 | + } | |
| 7697 | + } | |
| 7698 | + | |
| 7699 | + var lb = moment__default.defineLocale('lb', { | |
| 7700 | + months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), | |
| 7701 | + monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), | |
| 7702 | + weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'), | |
| 7703 | + weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), | |
| 7704 | + weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), | |
| 7705 | + longDateFormat: { | |
| 7706 | + LT: 'H:mm [Auer]', | |
| 7707 | + LTS: 'H:mm:ss [Auer]', | |
| 7708 | + L: 'DD.MM.YYYY', | |
| 7709 | + LL: 'D. MMMM YYYY', | |
| 7710 | + LLL: 'D. MMMM YYYY H:mm [Auer]', | |
| 7711 | + LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]' | |
| 7712 | + }, | |
| 7713 | + calendar: { | |
| 7714 | + sameDay: '[Haut um] LT', | |
| 7715 | + sameElse: 'L', | |
| 7716 | + nextDay: '[Muer um] LT', | |
| 7717 | + nextWeek: 'dddd [um] LT', | |
| 7718 | + lastDay: '[Gëschter um] LT', | |
| 7719 | + lastWeek: function () { | |
| 7720 | + // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule | |
| 7721 | + switch (this.day()) { | |
| 7722 | + case 2: | |
| 7723 | + case 4: | |
| 7724 | + return '[Leschten] dddd [um] LT'; | |
| 7725 | + default: | |
| 7726 | + return '[Leschte] dddd [um] LT'; | |
| 7727 | + } | |
| 7728 | + } | |
| 7729 | + }, | |
| 7730 | + relativeTime : { | |
| 7731 | + future : processFutureTime, | |
| 7732 | + past : processPastTime, | |
| 7733 | + s : 'e puer Sekonnen', | |
| 7734 | + m : lb__processRelativeTime, | |
| 7735 | + mm : '%d Minutten', | |
| 7736 | + h : lb__processRelativeTime, | |
| 7737 | + hh : '%d Stonnen', | |
| 7738 | + d : lb__processRelativeTime, | |
| 7739 | + dd : '%d Deeg', | |
| 7740 | + M : lb__processRelativeTime, | |
| 7741 | + MM : '%d Méint', | |
| 7742 | + y : lb__processRelativeTime, | |
| 7743 | + yy : '%d Joer' | |
| 7744 | + }, | |
| 7745 | + ordinalParse: /\d{1,2}\./, | |
| 7746 | + ordinal: '%d.', | |
| 7747 | + week: { | |
| 7748 | + dow: 1, // Monday is the first day of the week. | |
| 7749 | + doy: 4 // The week that contains Jan 4th is the first week of the year. | |
| 7750 | + } | |
| 7751 | + }); | |
| 7752 | + | |
| 7753 | + //! moment.js locale configuration | |
| 7754 | + //! locale : lao (lo) | |
| 7755 | + //! author : Ryan Hart : https://github.com/ryanhart2 | |
| 7756 | + | |
| 7757 | + var lo = moment__default.defineLocale('lo', { | |
| 7758 | + months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), | |
| 7759 | + monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), | |
| 7760 | + weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), | |
| 7761 | + weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), | |
| 7762 | + weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), | |
| 7763 | + longDateFormat : { | |
| 7764 | + LT : 'HH:mm', | |
| 7765 | + LTS : 'HH:mm:ss', | |
| 7766 | + L : 'DD/MM/YYYY', | |
| 7767 | + LL : 'D MMMM YYYY', | |
| 7768 | + LLL : 'D MMMM YYYY HH:mm', | |
| 7769 | + LLLL : 'ວັນdddd D MMMM YYYY HH:mm' | |
| 7770 | + }, | |
| 7771 | + meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/, | |
| 7772 | + isPM: function (input) { | |
| 7773 | + return input === 'ຕອນແລງ'; | |
| 7774 | + }, | |
| 7775 | + meridiem : function (hour, minute, isLower) { | |
| 7776 | + if (hour < 12) { | |
| 7777 | + return 'ຕອນເຊົ້າ'; | |
| 7778 | + } else { | |
| 7779 | + return 'ຕອນແລງ'; | |
| 7780 | + } | |
| 7781 | + }, | |
| 7782 | + calendar : { | |
| 7783 | + sameDay : '[ມື້ນີ້ເວລາ] LT', | |
| 7784 | + nextDay : '[ມື້ອື່ນເວລາ] LT', | |
| 7785 | + nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT', | |
| 7786 | + lastDay : '[ມື້ວານນີ້ເວລາ] LT', | |
| 7787 | + lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', | |
| 7788 | + sameElse : 'L' | |
| 7789 | + }, | |
| 7790 | + relativeTime : { | |
| 7791 | + future : 'ອີກ %s', | |
| 7792 | + past : '%sຜ່ານມາ', | |
| 7793 | + s : 'ບໍ່ເທົ່າໃດວິນາທີ', | |
| 7794 | + m : '1 ນາທີ', | |
| 7795 | + mm : '%d ນາທີ', | |
| 7796 | + h : '1 ຊົ່ວໂມງ', | |
| 7797 | + hh : '%d ຊົ່ວໂມງ', | |
| 7798 | + d : '1 ມື້', | |
| 7799 | + dd : '%d ມື້', | |
| 7800 | + M : '1 ເດືອນ', | |
| 7801 | + MM : '%d ເດືອນ', | |
| 7802 | + y : '1 ປີ', | |
| 7803 | + yy : '%d ປີ' | |
| 7804 | + }, | |
| 7805 | + ordinalParse: /(ທີ່)\d{1,2}/, | |
| 7806 | + ordinal : function (number) { | |
| 7807 | + return 'ທີ່' + number; | |
| 7808 | + } | |
| 7809 | + }); | |
| 7810 | + | |
| 7811 | + //! moment.js locale configuration | |
| 7812 | + //! locale : Lithuanian (lt) | |
| 7813 | + //! author : Mindaugas Mozūras : https://github.com/mmozuras | |
| 7814 | + | |
| 7815 | + var lt__units = { | |
| 7816 | + 'm' : 'minutė_minutės_minutę', | |
| 7817 | + 'mm': 'minutės_minučių_minutes', | |
| 7818 | + 'h' : 'valanda_valandos_valandą', | |
| 7819 | + 'hh': 'valandos_valandų_valandas', | |
| 7820 | + 'd' : 'diena_dienos_dieną', | |
| 7821 | + 'dd': 'dienos_dienų_dienas', | |
| 7822 | + 'M' : 'mėnuo_mėnesio_mėnesį', | |
| 7823 | + 'MM': 'mėnesiai_mėnesių_mėnesius', | |
| 7824 | + 'y' : 'metai_metų_metus', | |
| 7825 | + 'yy': 'metai_metų_metus' | |
| 7826 | + }; | |
| 7827 | + function translateSeconds(number, withoutSuffix, key, isFuture) { | |
| 7828 | + if (withoutSuffix) { | |
| 7829 | + return 'kelios sekundės'; | |
| 7830 | + } else { | |
| 7831 | + return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; | |
| 7832 | + } | |
| 7833 | + } | |
| 7834 | + function translateSingular(number, withoutSuffix, key, isFuture) { | |
| 7835 | + return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]); | |
| 7836 | + } | |
| 7837 | + function special(number) { | |
| 7838 | + return number % 10 === 0 || (number > 10 && number < 20); | |
| 7839 | + } | |
| 7840 | + function forms(key) { | |
| 7841 | + return lt__units[key].split('_'); | |
| 7842 | + } | |
| 7843 | + function lt__translate(number, withoutSuffix, key, isFuture) { | |
| 7844 | + var result = number + ' '; | |
| 7845 | + if (number === 1) { | |
| 7846 | + return result + translateSingular(number, withoutSuffix, key[0], isFuture); | |
| 7847 | + } else if (withoutSuffix) { | |
| 7848 | + return result + (special(number) ? forms(key)[1] : forms(key)[0]); | |
| 7849 | + } else { | |
| 7850 | + if (isFuture) { | |
| 7851 | + return result + forms(key)[1]; | |
| 7852 | + } else { | |
| 7853 | + return result + (special(number) ? forms(key)[1] : forms(key)[2]); | |
| 7854 | + } | |
| 7855 | + } | |
| 7856 | + } | |
| 7857 | + var lt = moment__default.defineLocale('lt', { | |
| 7858 | + months : { | |
| 7859 | + format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'), | |
| 7860 | + standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_') | |
| 7861 | + }, | |
| 7862 | + monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), | |
| 7863 | + weekdays : { | |
| 7864 | + format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'), | |
| 7865 | + standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'), | |
| 7866 | + isFormat: /dddd HH:mm/ | |
| 7867 | + }, | |
| 7868 | + weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), | |
| 7869 | + weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'), | |
| 7870 | + longDateFormat : { | |
| 7871 | + LT : 'HH:mm', | |
| 7872 | + LTS : 'HH:mm:ss', | |
| 7873 | + L : 'YYYY-MM-DD', | |
| 7874 | + LL : 'YYYY [m.] MMMM D [d.]', | |
| 7875 | + LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', | |
| 7876 | + LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', | |
| 7877 | + l : 'YYYY-MM-DD', | |
| 7878 | + ll : 'YYYY [m.] MMMM D [d.]', | |
| 7879 | + lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', | |
| 7880 | + llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]' | |
| 7881 | + }, | |
| 7882 | + calendar : { | |
| 7883 | + sameDay : '[Šiandien] LT', | |
| 7884 | + nextDay : '[Rytoj] LT', | |
| 7885 | + nextWeek : 'dddd LT', | |
| 7886 | + lastDay : '[Vakar] LT', | |
| 7887 | + lastWeek : '[Praėjusį] dddd LT', | |
| 7888 | + sameElse : 'L' | |
| 7889 | + }, | |
| 7890 | + relativeTime : { | |
| 7891 | + future : 'po %s', | |
| 7892 | + past : 'prieš %s', | |
| 7893 | + s : translateSeconds, | |
| 7894 | + m : translateSingular, | |
| 7895 | + mm : lt__translate, | |
| 7896 | + h : translateSingular, | |
| 7897 | + hh : lt__translate, | |
| 7898 | + d : translateSingular, | |
| 7899 | + dd : lt__translate, | |
| 7900 | + M : translateSingular, | |
| 7901 | + MM : lt__translate, | |
| 7902 | + y : translateSingular, | |
| 7903 | + yy : lt__translate | |
| 7904 | + }, | |
| 7905 | + ordinalParse: /\d{1,2}-oji/, | |
| 7906 | + ordinal : function (number) { | |
| 7907 | + return number + '-oji'; | |
| 7908 | + }, | |
| 7909 | + week : { | |
| 7910 | + dow : 1, // Monday is the first day of the week. | |
| 7911 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 7912 | + } | |
| 7913 | + }); | |
| 7914 | + | |
| 7915 | + //! moment.js locale configuration | |
| 7916 | + //! locale : latvian (lv) | |
| 7917 | + //! author : Kristaps Karlsons : https://github.com/skakri | |
| 7918 | + //! author : Jānis Elmeris : https://github.com/JanisE | |
| 7919 | + | |
| 7920 | + var lv__units = { | |
| 7921 | + 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), | |
| 7922 | + 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), | |
| 7923 | + 'h': 'stundas_stundām_stunda_stundas'.split('_'), | |
| 7924 | + 'hh': 'stundas_stundām_stunda_stundas'.split('_'), | |
| 7925 | + 'd': 'dienas_dienām_diena_dienas'.split('_'), | |
| 7926 | + 'dd': 'dienas_dienām_diena_dienas'.split('_'), | |
| 7927 | + 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), | |
| 7928 | + 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), | |
| 7929 | + 'y': 'gada_gadiem_gads_gadi'.split('_'), | |
| 7930 | + 'yy': 'gada_gadiem_gads_gadi'.split('_') | |
| 7931 | + }; | |
| 7932 | + /** | |
| 7933 | + * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. | |
| 7934 | + */ | |
| 7935 | + function lv__format(forms, number, withoutSuffix) { | |
| 7936 | + if (withoutSuffix) { | |
| 7937 | + // E.g. "21 minūte", "3 minūtes". | |
| 7938 | + return number % 10 === 1 && number !== 11 ? forms[2] : forms[3]; | |
| 7939 | + } else { | |
| 7940 | + // E.g. "21 minūtes" as in "pēc 21 minūtes". | |
| 7941 | + // E.g. "3 minūtēm" as in "pēc 3 minūtēm". | |
| 7942 | + return number % 10 === 1 && number !== 11 ? forms[0] : forms[1]; | |
| 7943 | + } | |
| 7944 | + } | |
| 7945 | + function lv__relativeTimeWithPlural(number, withoutSuffix, key) { | |
| 7946 | + return number + ' ' + lv__format(lv__units[key], number, withoutSuffix); | |
| 7947 | + } | |
| 7948 | + function relativeTimeWithSingular(number, withoutSuffix, key) { | |
| 7949 | + return lv__format(lv__units[key], number, withoutSuffix); | |
| 7950 | + } | |
| 7951 | + function relativeSeconds(number, withoutSuffix) { | |
| 7952 | + return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; | |
| 7953 | + } | |
| 7954 | + | |
| 7955 | + var lv = moment__default.defineLocale('lv', { | |
| 7956 | + months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'), | |
| 7957 | + monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), | |
| 7958 | + weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'), | |
| 7959 | + weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'), | |
| 7960 | + weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'), | |
| 7961 | + longDateFormat : { | |
| 7962 | + LT : 'HH:mm', | |
| 7963 | + LTS : 'HH:mm:ss', | |
| 7964 | + L : 'DD.MM.YYYY.', | |
| 7965 | + LL : 'YYYY. [gada] D. MMMM', | |
| 7966 | + LLL : 'YYYY. [gada] D. MMMM, HH:mm', | |
| 7967 | + LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm' | |
| 7968 | + }, | |
| 7969 | + calendar : { | |
| 7970 | + sameDay : '[Šodien pulksten] LT', | |
| 7971 | + nextDay : '[Rīt pulksten] LT', | |
| 7972 | + nextWeek : 'dddd [pulksten] LT', | |
| 7973 | + lastDay : '[Vakar pulksten] LT', | |
| 7974 | + lastWeek : '[Pagājušā] dddd [pulksten] LT', | |
| 7975 | + sameElse : 'L' | |
| 7976 | + }, | |
| 7977 | + relativeTime : { | |
| 7978 | + future : 'pēc %s', | |
| 7979 | + past : 'pirms %s', | |
| 7980 | + s : relativeSeconds, | |
| 7981 | + m : relativeTimeWithSingular, | |
| 7982 | + mm : lv__relativeTimeWithPlural, | |
| 7983 | + h : relativeTimeWithSingular, | |
| 7984 | + hh : lv__relativeTimeWithPlural, | |
| 7985 | + d : relativeTimeWithSingular, | |
| 7986 | + dd : lv__relativeTimeWithPlural, | |
| 7987 | + M : relativeTimeWithSingular, | |
| 7988 | + MM : lv__relativeTimeWithPlural, | |
| 7989 | + y : relativeTimeWithSingular, | |
| 7990 | + yy : lv__relativeTimeWithPlural | |
| 7991 | + }, | |
| 7992 | + ordinalParse: /\d{1,2}\./, | |
| 7993 | + ordinal : '%d.', | |
| 7994 | + week : { | |
| 7995 | + dow : 1, // Monday is the first day of the week. | |
| 7996 | + doy : 4 // The week that contains Jan 4th is the first week of the year. | |
| 7997 | + } | |
| 7998 | + }); | |
| 7999 | + | |
| 8000 | + //! moment.js locale configuration | |
| 8001 | + //! locale : Montenegrin (me) | |
| 8002 | + //! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac | |
| 8003 | + | |
| 8004 | + var me__translator = { | |
| 8005 | + words: { //Different grammatical cases | |
| 8006 | + m: ['jedan minut', 'jednog minuta'], | |
| 8007 | + mm: ['minut', 'minuta', 'minuta'], | |
| 8008 | + h: ['jedan sat', 'jednog sata'], | |
| 8009 | + hh: ['sat', 'sata', 'sati'], | |
| 8010 | + dd: ['dan', 'dana', 'dana'], | |
| 8011 | + MM: ['mjesec', 'mjeseca', 'mjeseci'], | |
| 8012 | + yy: ['godina', 'godine', 'godina'] | |
| 8013 | + }, | |
| 8014 | + correctGrammaticalCase: function (number, wordKey) { | |
| 8015 | + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); | |
| 8016 | + }, | |
| 8017 | + translate: function (number, withoutSuffix, key) { | |
| 8018 | + var wordKey = me__translator.words[key]; | |
| 8019 | + if (key.length === 1) { | |
| 8020 | + return withoutSuffix ? wordKey[0] : wordKey[1]; | |
| 8021 | + } else { | |
| 8022 | + return number + ' ' + me__translator.correctGrammaticalCase(number, wordKey); | |
| 8023 | + } | |
| 8024 | + } | |
| 8025 | + }; | |
| 8026 | + | |
| 8027 | + var me = moment__default.defineLocale('me', { | |
| 8028 | + months: ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'], | |
| 8029 | + monthsShort: ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'], | |
| 8030 | + weekdays: ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], | |
| 8031 | + weekdaysShort: ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'], | |
| 8032 | + weekdaysMin: ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], | |
| 8033 | + longDateFormat: { | |
| 8034 | + LT: 'H:mm', | |
| 8035 | + LTS : 'H:mm:ss', | |
| 8036 | + L: 'DD. MM. YYYY', | |
| 8037 | + LL: 'D. MMMM YYYY', | |
| 8038 | + LLL: 'D. MMMM YYYY H:mm', | |
| 8039 | + LLLL: 'dddd, D. MMMM YYYY H:mm' | |
| 8040 | + }, | |
| 8041 | + calendar: { | |
| 8042 | + sameDay: '[danas u] LT', | |
| 8043 | + nextDay: '[sjutra u] LT', | |
| 8044 | + | |
| 8045 | + nextWeek: function () { | |
| 8046 | + switch (this.day()) { | |
| 8047 | + case 0: | |
| 8048 | + return '[u] [nedjelju] [u] LT'; | |
| 8049 | + case 3: | |
| 8050 | + return '[u] [srijedu] [u] LT'; | |
| 8051 | + case 6: | |
| 8052 | + return '[u] [subotu] [u] LT'; | |
| 8053 | + case 1: | |
| 8054 | + case 2: | |
| 8055 | + case 4: | |
| 8056 | + case 5: | |
| 8057 | + return '[u] dddd [u] LT'; | |
| 8058 | + } | |
| 8059 | + }, | |
| 8060 | + lastDay : '[juče u] LT', | |
| 8061 | + lastWeek : function () { | |
| 8062 | + var lastWeekDays = [ | |
| 8063 | + '[prošle] [nedjelje] [u] LT', | |
| 8064 | + '[prošlog] [ponedjeljka] [u] LT', | |
| 8065 | + '[prošlog] [utorka] [u] LT', | |
| 8066 | + '[prošle] [srijede] [u] LT', | |
| 8067 | + '[prošlog] [četvrtka] [u] LT', | |
| 8068 | + '[prošlog] [petka] [u] LT', | |
| 8069 | + '[prošle] [subote] [u] LT' | |
| 8070 | + ]; | |
| 8071 | + return lastWeekDays[this.day()]; | |
| 8072 | + }, | |
| 8073 | + sameElse : 'L' | |
| 8074 | + }, | |
| 8075 | + relativeTime : { | |
| 8076 | + future : 'za %s', | |
| 8077 | + past : 'prije %s', | |
| 8078 | + s : 'nekoliko sekundi', | |
| 8079 | + m : me__translator.translate, | |
| 8080 | + mm : me__translator.translate, | |
| 8081 | + h : me__translator.translate, | |
| 8082 | + hh : me__translator.translate, | |
| 8083 | + d : 'dan', | |
| 8084 | + dd : me__translator.translate, | |
| 8085 | + M : 'mjesec', | |
| 8086 | + MM : me__translator.translate, | |
| 8087 | + y : 'godinu', | |
| 8088 | + yy : me__translator.translate | |
| 8089 | + }, | |
| 8090 | + ordinalParse: /\d{1,2}\./, | |
| 8091 | + ordinal : '%d.', | |
| 8092 | + week : { | |
| 8093 | + dow : 1, // Monday is the first day of the week. | |
| 8094 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 8095 | + } | |
| 8096 | + }); | |
| 8097 | + | |
| 8098 | + //! moment.js locale configuration | |
| 8099 | + //! locale : macedonian (mk) | |
| 8100 | + //! author : Borislav Mickov : https://github.com/B0k0 | |
| 8101 | + | |
| 8102 | + var mk = moment__default.defineLocale('mk', { | |
| 8103 | + months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'), | |
| 8104 | + monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), | |
| 8105 | + weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'), | |
| 8106 | + weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'), | |
| 8107 | + weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'), | |
| 8108 | + longDateFormat : { | |
| 8109 | + LT : 'H:mm', | |
| 8110 | + LTS : 'H:mm:ss', | |
| 8111 | + L : 'D.MM.YYYY', | |
| 8112 | + LL : 'D MMMM YYYY', | |
| 8113 | + LLL : 'D MMMM YYYY H:mm', | |
| 8114 | + LLLL : 'dddd, D MMMM YYYY H:mm' | |
| 8115 | + }, | |
| 8116 | + calendar : { | |
| 8117 | + sameDay : '[Денес во] LT', | |
| 8118 | + nextDay : '[Утре во] LT', | |
| 8119 | + nextWeek : '[Во] dddd [во] LT', | |
| 8120 | + lastDay : '[Вчера во] LT', | |
| 8121 | + lastWeek : function () { | |
| 8122 | + switch (this.day()) { | |
| 8123 | + case 0: | |
| 8124 | + case 3: | |
| 8125 | + case 6: | |
| 8126 | + return '[Изминатата] dddd [во] LT'; | |
| 8127 | + case 1: | |
| 8128 | + case 2: | |
| 8129 | + case 4: | |
| 8130 | + case 5: | |
| 8131 | + return '[Изминатиот] dddd [во] LT'; | |
| 8132 | + } | |
| 8133 | + }, | |
| 8134 | + sameElse : 'L' | |
| 8135 | + }, | |
| 8136 | + relativeTime : { | |
| 8137 | + future : 'после %s', | |
| 8138 | + past : 'пред %s', | |
| 8139 | + s : 'неколку секунди', | |
| 8140 | + m : 'минута', | |
| 8141 | + mm : '%d минути', | |
| 8142 | + h : 'час', | |
| 8143 | + hh : '%d часа', | |
| 8144 | + d : 'ден', | |
| 8145 | + dd : '%d дена', | |
| 8146 | + M : 'месец', | |
| 8147 | + MM : '%d месеци', | |
| 8148 | + y : 'година', | |
| 8149 | + yy : '%d години' | |
| 8150 | + }, | |
| 8151 | + ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, | |
| 8152 | + ordinal : function (number) { | |
| 8153 | + var lastDigit = number % 10, | |
| 8154 | + last2Digits = number % 100; | |
| 8155 | + if (number === 0) { | |
| 8156 | + return number + '-ев'; | |
| 8157 | + } else if (last2Digits === 0) { | |
| 8158 | + return number + '-ен'; | |
| 8159 | + } else if (last2Digits > 10 && last2Digits < 20) { | |
| 8160 | + return number + '-ти'; | |
| 8161 | + } else if (lastDigit === 1) { | |
| 8162 | + return number + '-ви'; | |
| 8163 | + } else if (lastDigit === 2) { | |
| 8164 | + return number + '-ри'; | |
| 8165 | + } else if (lastDigit === 7 || lastDigit === 8) { | |
| 8166 | + return number + '-ми'; | |
| 8167 | + } else { | |
| 8168 | + return number + '-ти'; | |
| 8169 | + } | |
| 8170 | + }, | |
| 8171 | + week : { | |
| 8172 | + dow : 1, // Monday is the first day of the week. | |
| 8173 | + doy : 7 // The week that contains Jan 1st is the first week of the year. | |
| 8174 | + } | |
| 8175 | + }); | |
| 8176 | + | |
| 8177 | + //! moment.js locale configuration | |
| 8178 | + //! locale : malayalam (ml) | |
| 8179 | + //! author : Floyd Pink : https://github.com/floydpink | |
| 8180 | + | |
| 8181 | + var ml = moment__default.defineLocale('ml', { | |
| 8182 | + months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'), | |
| 8183 | + monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'), | |
| 8184 | + weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'), | |
| 8185 | + weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), | |
| 8186 | + weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), | |
| 8187 | + longDateFormat : { | |
| 8188 | + LT : 'A h:mm -നു', | |
| 8189 | + LTS : 'A h:mm:ss -നു', | |
| 8190 | + L : 'DD/MM/YYYY', | |
| 8191 | + LL : 'D MMMM YYYY', | |
| 8192 | + LLL : 'D MMMM YYYY, A h:mm -നു', | |
| 8193 | + LLLL : 'dddd, D MMMM YYYY, A h:mm -നു' | |
| 8194 | + }, | |
| 8195 | + calendar : { | |
| 8196 | + sameDay : '[ഇന്ന്] LT', | |
| 8197 | + nextDay : '[നാളെ] LT', | |
| 8198 | + nextWeek : 'dddd, LT', | |
| 8199 | + lastDay : '[ഇന്നലെ] LT', | |
| 8200 | + lastWeek : '[കഴിഞ്ഞ] dddd, LT', | |
| 8201 | + sameElse : 'L' | |
| 8202 | + }, | |
| 8203 | + relativeTime : { | |
| 8204 | + future : '%s കഴിഞ്ഞ്', | |
| 8205 | + past : '%s മുൻപ്', | |
| 8206 | + s : 'അൽപ നിമിഷങ്ങൾ', | |
| 8207 | + m : 'ഒരു മിനിറ്റ്', | |
| 8208 | + mm : '%d മിനിറ്റ്', | |
| 8209 | + h : 'ഒരു മണിക്കൂർ', | |
| 8210 | + hh : '%d മണിക്കൂർ', | |
| 8211 | + d : 'ഒരു ദിവസം', | |
| 8212 | + dd : '%d ദിവസം', | |
| 8213 | + M : 'ഒരു മാസം', | |
| 8214 | + MM : '%d മാസം', | |
| 8215 | + y : 'ഒരു വർഷം', | |
| 8216 | + yy : '%d വർഷം' | |
| 8217 | + }, | |
| 8218 | + meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, | |
| 8219 | + isPM : function (input) { | |
| 8220 | + return /^(ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി)$/.test(input); | |
| 8221 | + }, | |
| 8222 | + meridiem : function (hour, minute, isLower) { | |
| 8223 | + if (hour < 4) { | |
| 8224 | + return 'രാത്രി'; | |
| 8225 | + } else if (hour < 12) { | |
| 8226 | + return 'രാവിലെ'; | |
| 8227 | + } else if (hour < 17) { | |
| 8228 | + return 'ഉച്ച കഴിഞ്ഞ്'; | |
| 8229 | + } else if (hour < 20) { | |
| 8230 | + return 'വൈകുന്നേരം'; | |
| 8231 | + } else { | |
| 8232 | + return 'രാത്രി'; | |
| 8233 | + } | |
| 8234 | + } | |
| 8235 | + }); | |
| 8236 | + | |
| 8237 | + //! moment.js locale configuration | |
| 8238 | + //! locale : Marathi (mr) | |
| 8239 | + //! author : Harshad Kale : https://github.com/kalehv | |
| 8240 | + //! author : Vivek Athalye : https://github.com/vnathalye | |
| 8241 | + | |
| 8242 | + var mr__symbolMap = { | |
| 8243 | + '1': '१', | |
| 8244 | + '2': '२', | |
| 8245 | + '3': '३', | |
| 8246 | + '4': '४', | |
| 8247 | + '5': '५', | |
| 8248 | + '6': '६', | |
| 8249 | + '7': '७', | |
| 8250 | + '8': '८', | |
| 8251 | + '9': '९', | |
| 8252 | + '0': '०' | |
| 8253 | + }, | |
| 8254 | + mr__numberMap = { | |
| 8255 | + '१': '1', | |
| 8256 | + '२': '2', | |
| 8257 | + '३': '3', | |
| 8258 | + '४': '4', | |
| 8259 | + '५': '5', | |
| 8260 | + '६': '6', | |
| 8261 | + '७': '7', | |
| 8262 | + '८': '8', | |
| 8263 | + '९': '9', | |
| 8264 | + '०': '0' | |
| 8265 | + }; | |
| 8266 | + | |
| 8267 | + function relativeTimeMr(number, withoutSuffix, string, isFuture) | |
| 8268 | + { | |
| 8269 | + var output = ''; | |
| 8270 | + if (withoutSuffix) { | |
| 8271 | + switch (string) { | |
| 8272 | + case 's': output = 'काही सेकंद'; break; | |
| 8273 | + case 'm': output = 'एक मिनिट'; break; | |
| 8274 | + case 'mm': output = '%d मिनिटे'; break; | |
| 8275 | + case 'h': output = 'एक तास'; break; | |
| 8276 | + case 'hh': output = '%d तास'; break; | |
| 8277 | + case 'd': output = 'एक दिवस'; break; | |
| 8278 | + case 'dd': output = '%d दिवस'; break; | |
| 8279 | + case 'M': output = 'एक महिना'; break; | |
| 8280 | + case 'MM': output = '%d महिने'; break; | |
| 8281 | + case 'y': output = 'एक वर्ष'; break; | |
| 8282 | + case 'yy': output = '%d वर्षे'; break; | |
| 8283 | + } | |
| 8284 | + } | |
| 8285 | + else { | |
| 8286 | + switch (string) { | |
| 8287 | + case 's': output = 'काही सेकंदां'; break; | |
| 8288 | + case 'm': output = 'एका मिनिटा'; break; | |
| 8289 | + case 'mm': output = '%d मिनिटां'; break; | |
| 8290 | + case 'h': output = 'एका तासा'; break; | |
| 8291 | + case 'hh': output = '%d तासां'; break; | |
| 8292 | + case 'd': output = 'एका दिवसा'; break; | |
| 8293 | + case 'dd': output = '%d दिवसां'; break; | |
| 8294 | + case 'M': output = 'एका महिन्या'; break; | |
| 8295 | + case 'MM': output = '%d महिन्यां'; break; | |
| 8296 | + case 'y': output = 'एका वर्षा'; break; | |
| 8297 | + case 'yy': output = '%d वर्षां'; break; | |
| 8298 | + } | |
| 8299 | + } | |
| 8300 | + return output.replace(/%d/i, number); | |
| 8301 | + } | |
| 8302 | + | |
| 8303 | + var mr = moment__default.defineLocale('mr', { | |
| 8304 | + months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'), | |
| 8305 | + monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'), | |
| 8306 | + weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), | |
| 8307 | + weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), | |
| 8308 | + weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), | |
| 8309 | + longDateFormat : { | |
| 8310 | + LT : 'A h:mm वाजता', | |
| 8311 | + LTS : 'A h:mm:ss वाजता', | |
| 8312 | + L : 'DD/MM/YYYY', | |
| 8313 | + LL : 'D MMMM YYYY', | |
| 8314 | + LLL : 'D MMMM YYYY, A h:mm वाजता', | |
| 8315 | + LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता' | |
| 8316 | + }, | |
| 8317 | + calendar : { | |
| 8318 | + sameDay : '[आज] LT', | |
| 8319 | + nextDay : '[उद्या] LT', | |
| 8320 | + nextWeek : 'dddd, LT', | |
| 8321 | + lastDay : '[काल] LT', | |
| 8322 | + lastWeek: '[मागील] dddd, LT', | |
| 8323 | + sameElse : 'L' | |
| 8324 | + }, | |
| 8325 | + relativeTime : { | |
| 8326 | + future: '%sमध्ये', | |
| 8327 | + past: '%sपूर्वी', | |
| 8328 | + s: relativeTimeMr, | |
| 8329 | + m: relativeTimeMr, | |
| 8330 | + mm: relativeTimeMr, | |
| 8331 | + h: relativeTimeMr, | |