aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames D. Forrester <jforrester@wikimedia.org>2025-03-27 18:52:52 -0400
committerJames D. Forrester <jforrester@wikimedia.org>2025-04-06 08:22:16 -0400
commitc2b16b995d9db4f2da14af5e55bded40cbff82d2 (patch)
tree0d168c2e822a176f95f32e904c0bed5b8f0b312a
parent2a5cf3fde93263156557bc1efd21c5a74ce67725 (diff)
downloadmediawikicore-c2b16b995d9db4f2da14af5e55bded40cbff82d2.tar.gz
mediawikicore-c2b16b995d9db4f2da14af5e55bded40cbff82d2.zip
Upgrade moment from v2.25.2 to v2.30.1
Five new locales, two of which map to supported languages in core (ku-kmr -> ku, and tk -> tk), and three of which don't but are added in for future support and for languages that might be configured in production systems (ar-ps, bn-bd, and es-mx). Bug: T389416 Change-Id: Ic69ddf92f922515bf36a2ea1770b2c8ebd2c46b2
-rw-r--r--RELEASE-NOTES-1.441
-rw-r--r--resources/Resources.php5
-rw-r--r--resources/lib/foreign-resources.cdx.json6
-rw-r--r--resources/lib/foreign-resources.yaml18
-rw-r--r--resources/lib/moment/CHANGELOG.md67
-rw-r--r--resources/lib/moment/README.md86
-rw-r--r--resources/lib/moment/locale/ar-dz.js158
-rw-r--r--resources/lib/moment/locale/ar-kw.js7
-rw-r--r--resources/lib/moment/locale/ar-ly.js38
-rw-r--r--resources/lib/moment/locale/ar-ma.js11
-rw-r--r--resources/lib/moment/locale/ar-ps.js123
-rw-r--r--resources/lib/moment/locale/ar-sa.js27
-rw-r--r--resources/lib/moment/locale/ar-tn.js7
-rw-r--r--resources/lib/moment/locale/ar.js36
-rw-r--r--resources/lib/moment/locale/az.js9
-rw-r--r--resources/lib/moment/locale/be.js23
-rw-r--r--resources/lib/moment/locale/bg.js2
-rw-r--r--resources/lib/moment/locale/bn-bd.js140
-rw-r--r--resources/lib/moment/locale/bn.js27
-rw-r--r--resources/lib/moment/locale/bo.js34
-rw-r--r--resources/lib/moment/locale/br.js81
-rw-r--r--resources/lib/moment/locale/bs.js25
-rw-r--r--resources/lib/moment/locale/ca.js33
-rw-r--r--resources/lib/moment/locale/cs.js22
-rw-r--r--resources/lib/moment/locale/cv.js11
-rw-r--r--resources/lib/moment/locale/cy.js7
-rw-r--r--resources/lib/moment/locale/de-at.js15
-rw-r--r--resources/lib/moment/locale/de-ch.js15
-rw-r--r--resources/lib/moment/locale/de.js15
-rw-r--r--resources/lib/moment/locale/el.js14
-rw-r--r--resources/lib/moment/locale/en-au.js14
-rw-r--r--resources/lib/moment/locale/en-ca.js12
-rw-r--r--resources/lib/moment/locale/en-gb.js12
-rw-r--r--resources/lib/moment/locale/en-ie.js12
-rw-r--r--resources/lib/moment/locale/en-il.js12
-rw-r--r--resources/lib/moment/locale/en-in.js16
-rw-r--r--resources/lib/moment/locale/en-nz.js12
-rw-r--r--resources/lib/moment/locale/en-sg.js12
-rw-r--r--resources/lib/moment/locale/es-do.js18
-rw-r--r--resources/lib/moment/locale/es-mx.js121
-rw-r--r--resources/lib/moment/locale/es-us.js18
-rw-r--r--resources/lib/moment/locale/es.js20
-rw-r--r--resources/lib/moment/locale/et.js12
-rw-r--r--resources/lib/moment/locale/eu.js14
-rw-r--r--resources/lib/moment/locale/fa.js41
-rw-r--r--resources/lib/moment/locale/fi.js24
-rw-r--r--resources/lib/moment/locale/fo.js7
-rw-r--r--resources/lib/moment/locale/fr-ca.js7
-rw-r--r--resources/lib/moment/locale/fr-ch.js7
-rw-r--r--resources/lib/moment/locale/fr.js38
-rw-r--r--resources/lib/moment/locale/fy.js10
-rw-r--r--resources/lib/moment/locale/gl.js7
-rw-r--r--resources/lib/moment/locale/gom-deva.js18
-rw-r--r--resources/lib/moment/locale/gom-latn.js16
-rw-r--r--resources/lib/moment/locale/gu.js29
-rw-r--r--resources/lib/moment/locale/he.js8
-rw-r--r--resources/lib/moment/locale/hi.js85
-rw-r--r--resources/lib/moment/locale/hr.js12
-rw-r--r--resources/lib/moment/locale/hu.js14
-rw-r--r--resources/lib/moment/locale/hy-am.js14
-rw-r--r--resources/lib/moment/locale/id.js4
-rw-r--r--resources/lib/moment/locale/is.js7
-rw-r--r--resources/lib/moment/locale/it.js14
-rw-r--r--resources/lib/moment/locale/ka.js20
-rw-r--r--resources/lib/moment/locale/km.js27
-rw-r--r--resources/lib/moment/locale/kn.js27
-rw-r--r--resources/lib/moment/locale/ku-kmr.js125
-rw-r--r--resources/lib/moment/locale/ku.js32
-rw-r--r--resources/lib/moment/locale/lb.js14
-rw-r--r--resources/lib/moment/locale/lo.js7
-rw-r--r--resources/lib/moment/locale/lt.js18
-rw-r--r--resources/lib/moment/locale/lv.js7
-rw-r--r--resources/lib/moment/locale/me.js9
-rw-r--r--resources/lib/moment/locale/mi.js7
-rw-r--r--resources/lib/moment/locale/ml.js14
-rw-r--r--resources/lib/moment/locale/mn.js7
-rw-r--r--resources/lib/moment/locale/mr.js27
-rw-r--r--resources/lib/moment/locale/mt.js7
-rw-r--r--resources/lib/moment/locale/my.js20
-rw-r--r--resources/lib/moment/locale/nb.js13
-rw-r--r--resources/lib/moment/locale/ne.js27
-rw-r--r--resources/lib/moment/locale/nl-be.js26
-rw-r--r--resources/lib/moment/locale/nl.js28
-rw-r--r--resources/lib/moment/locale/nn.js7
-rw-r--r--resources/lib/moment/locale/oc-lnc.js26
-rw-r--r--resources/lib/moment/locale/pa-in.js27
-rw-r--r--resources/lib/moment/locale/pl.js51
-rw-r--r--resources/lib/moment/locale/pt-br.js8
-rw-r--r--resources/lib/moment/locale/pt.js9
-rw-r--r--resources/lib/moment/locale/ro.js10
-rw-r--r--resources/lib/moment/locale/ru.js48
-rw-r--r--resources/lib/moment/locale/se.js12
-rw-r--r--resources/lib/moment/locale/si.js7
-rw-r--r--resources/lib/moment/locale/sk.js7
-rw-r--r--resources/lib/moment/locale/sl.js7
-rw-r--r--resources/lib/moment/locale/sr-cyrl.js68
-rw-r--r--resources/lib/moment/locale/sr.js66
-rw-r--r--resources/lib/moment/locale/ss.js7
-rw-r--r--resources/lib/moment/locale/sv.js12
-rw-r--r--resources/lib/moment/locale/sw.js11
-rw-r--r--resources/lib/moment/locale/ta.js34
-rw-r--r--resources/lib/moment/locale/te.js14
-rw-r--r--resources/lib/moment/locale/tet.js12
-rw-r--r--resources/lib/moment/locale/tg.js16
-rw-r--r--resources/lib/moment/locale/th.js9
-rw-r--r--resources/lib/moment/locale/tk.js102
-rw-r--r--resources/lib/moment/locale/tlh.js33
-rw-r--r--resources/lib/moment/locale/tr.js15
-rw-r--r--resources/lib/moment/locale/tzl.js4
-rw-r--r--resources/lib/moment/locale/tzm-latn.js7
-rw-r--r--resources/lib/moment/locale/tzm.js7
-rw-r--r--resources/lib/moment/locale/ug-cn.js11
-rw-r--r--resources/lib/moment/locale/uk.js36
-rw-r--r--resources/lib/moment/locale/uz-latn.js7
-rw-r--r--resources/lib/moment/locale/vi.js9
-rw-r--r--resources/lib/moment/locale/x-pseudo.js26
-rw-r--r--resources/lib/moment/locale/zh-cn.js19
-rw-r--r--resources/lib/moment/moment.js916
118 files changed, 2504 insertions, 1348 deletions
diff --git a/RELEASE-NOTES-1.44 b/RELEASE-NOTES-1.44
index 8c3f7e05a30a..0355f639e559 100644
--- a/RELEASE-NOTES-1.44
+++ b/RELEASE-NOTES-1.44
@@ -149,6 +149,7 @@ For notes on 1.43.x and older releases, see HISTORY.
* Updated codex, codex-design-tokens and codex-icons
from v1.14.0 to v1.22.0.
* Updated mck89/peast from 1.16.3 to 1.17.0.
+* Updated moment from v2.25.2 to v2.30.1.
* Updated OOUI from v0.51.2 to v0.51.7.
* Updated vue from 3.4.27 to 3.5.13.
* Updated wikimedia/bcp-47-code from 2.0.0 to 2.0.1.
diff --git a/resources/Resources.php b/resources/Resources.php
index 2883843e5bd6..5f4e85c1e81e 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -399,12 +399,14 @@ return [
'af' => 'resources/lib/moment/locale/af.js',
'ar' => 'resources/lib/moment/locale/ar.js',
'ar-ma' => 'resources/lib/moment/locale/ar-ma.js',
+ 'ar-ps' => 'resources/lib/moment/locale/ar-ps.js',
'ar-sa' => 'resources/lib/moment/locale/ar-sa.js',
'az' => 'resources/lib/moment/locale/az.js',
'be' => 'resources/lib/moment/locale/be.js',
'bg' => 'resources/lib/moment/locale/bg.js',
'bm' => 'resources/lib/moment/locale/bm.js',
'bn' => 'resources/lib/moment/locale/bn.js',
+ 'bn-bd' => 'resources/lib/moment/locale/bn-bd.js',
'bo' => 'resources/lib/moment/locale/bo.js',
'br' => 'resources/lib/moment/locale/br.js',
'bs' => 'resources/lib/moment/locale/bs.js',
@@ -424,6 +426,7 @@ return [
'en-gb' => 'resources/lib/moment/locale/en-gb.js',
'eo' => 'resources/lib/moment/locale/eo.js',
'es' => 'resources/lib/moment/locale/es.js',
+ 'es-mx' => 'resources/lib/moment/locale/es-mx.js',
'et' => 'resources/lib/moment/locale/et.js',
'eu' => 'resources/lib/moment/locale/eu.js',
'fa' => 'resources/lib/moment/locale/fa.js',
@@ -452,6 +455,7 @@ return [
'kk-cyrl' => 'resources/lib/moment/locale/kk.js',
'kn' => 'resources/lib/moment/locale/kn.js',
'ko' => 'resources/lib/moment/locale/ko.js',
+ 'ku' => 'resources/lib/moment/locale/ku-kmr.js',
'ky' => 'resources/lib/moment/locale/ky.js',
'lo' => 'resources/lib/moment/locale/lo.js',
'lt' => 'resources/lib/moment/locale/lt.js',
@@ -488,6 +492,7 @@ return [
'te' => 'resources/lib/moment/locale/te.js',
'tet' => 'resources/lib/moment/locale/tet.js',
'th' => 'resources/lib/moment/locale/th.js',
+ 'tk' => 'resources/lib/moment/locale/tk.js',
'tl' => 'resources/lib/moment/locale/tl-ph.js',
'tr' => 'resources/lib/moment/locale/tr.js',
'tzm' => 'resources/lib/moment/locale/tzm.js',
diff --git a/resources/lib/foreign-resources.cdx.json b/resources/lib/foreign-resources.cdx.json
index 318f04343cde..739007cc9ecb 100644
--- a/resources/lib/foreign-resources.cdx.json
+++ b/resources/lib/foreign-resources.cdx.json
@@ -2,7 +2,7 @@
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.6",
- "serialNumber": "urn:uuid:922dbfb8-d8b8-4a04-8969-0fe49e42c738",
+ "serialNumber": "urn:uuid:2d3c408e-f84b-4c39-aca6-1a6705f8b41e",
"version": 1,
"components": [
{
@@ -330,7 +330,7 @@
{
"type": "library",
"name": "moment",
- "version": "2.25.2",
+ "version": "2.30.1",
"licenses": [
{
"license": {
@@ -338,7 +338,7 @@
}
}
],
- "purl": "pkg:github/moment/moment@2.25.2",
+ "purl": "pkg:github/moment/moment@2.30.1",
"authors": [
{
"name": "JS Foundation and other contributors"
diff --git a/resources/lib/foreign-resources.yaml b/resources/lib/foreign-resources.yaml
index d436a68011b8..d0a58cc23824 100644
--- a/resources/lib/foreign-resources.yaml
+++ b/resources/lib/foreign-resources.yaml
@@ -301,17 +301,17 @@ moment:
license: MIT
homepage: https://momentjs.com
authors: JS Foundation and other contributors
- version: 2.25.2
- purl: pkg:github/moment/moment@2.25.2
+ version: 2.30.1
+ purl: pkg:github/moment/moment@2.30.1
type: tar
- src: https://codeload.github.com/moment/moment/tar.gz/2.25.2
- integrity: sha384-Kdi8+psMUggMYwnp+uBCuy03sBfDbKFyjzdLWJks/4O8x4DwOFWzYbtm7RbJ4ISU
+ src: https://codeload.github.com/moment/moment/tar.gz/2.30.1
+ integrity: sha384-PqvOPbeNfcZqJunZo/JI3zgtel3Y36u3wR6Da8vs6HKuNlPDUiacaXoe3+a8efyH
dest:
- moment-2.25.2/moment.js:
- moment-2.25.2/CHANGELOG.md:
- moment-2.25.2/README.md:
- moment-2.25.2/LICENSE:
- moment-2.25.2/locale/*.js: locale
+ moment-2.30.1/moment.js:
+ moment-2.30.1/CHANGELOG.md:
+ moment-2.30.1/README.md:
+ moment-2.30.1/LICENSE:
+ moment-2.30.1/locale/*.js: locale
mustache:
license: MIT
diff --git a/resources/lib/moment/CHANGELOG.md b/resources/lib/moment/CHANGELOG.md
index f614dfc768d0..90933d6e632a 100644
--- a/resources/lib/moment/CHANGELOG.md
+++ b/resources/lib/moment/CHANGELOG.md
@@ -1,6 +1,73 @@
Changelog
=========
+### 2.30.1
+* Release Dec 27, 2023
+* Revert https://github.com/moment/moment/pull/5827, because it's breaking
+ a lot of TS code.
+
+### 2.30.0 [Full changelog](https://gist.github.com/ichernev/e277bcd1f0eeabb834f60a777237925a)
+* Release Dec 26, 2023
+
+### 2.29.4
+
+* Release Jul 6, 2022
+ * [#6015](https://github.com/moment/moment/pull/6015) [bugfix] Fix ReDoS in preprocessRFC2822 regex
+
+### 2.29.3 [Full changelog](https://gist.github.com/ichernev/edebd440f49adcaec72e5e77b791d8be)
+
+* Release Apr 17, 2022
+ * [#5995](https://github.com/moment/moment/pull/5995) [bugfix] Remove const usage
+ * [#5990](https://github.com/moment/moment/pull/5990) misc: fix advisory link
+
+
+### 2.29.2 [See full changelog](https://gist.github.com/ichernev/1904b564f6679d9aac1ae08ce13bc45c)
+
+* Release Apr 3 2022
+
+Address https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4
+
+### 2.29.1 [See full changelog](https://gist.github.com/marwahaha/cc478ba01a1292ab4bd4e861d164d99b)
+
+* Release Oct 6, 2020
+
+Updated deprecation message, bugfix in hi locale
+
+### 2.29.0 [See full changelog](https://gist.github.com/marwahaha/b0111718641a6461800066549957ec14)
+
+* Release Sept 22, 2020
+
+New locales (es-mx, bn-bd).
+Minor bugfixes and locale improvements.
+More tests.
+Moment is in maintenance mode. Read more at this link:
+https://momentjs.com/docs/#/-project-status/
+
+### 2.28.0 [See full changelog](https://gist.github.com/marwahaha/028fd6c2b2470b2804857cfd63c0e94f)
+
+* Release Sept 13, 2020
+
+Fix bug where .format() modifies original instance, and locale updates
+
+### 2.27.0 [See full changelog](https://gist.github.com/marwahaha/5100c9c2f42019067b1f6cefc333daa7)
+
+* Release June 18, 2020
+
+Added Turkmen locale, other locale improvements, slight TypeScript fixes
+
+### 2.26.0 [See full changelog](https://gist.github.com/marwahaha/0725c40740560854a849b096ea7b7590)
+
+* Release May 19, 2020
+
+TypeScript fixes and many locale improvements
+
+### 2.25.3
+
+* Release May 4, 2020
+
+Remove package.json module property. It looks like webpack behaves differently
+for modules loaded via module vs jsnext:main.
+
### 2.25.2
* Release May 4, 2020
diff --git a/resources/lib/moment/README.md b/resources/lib/moment/README.md
index 96077622ccc7..38e61bb812d6 100644
--- a/resources/lib/moment/README.md
+++ b/resources/lib/moment/README.md
@@ -1,69 +1,55 @@
-[![Join the chat at https://gitter.im/moment/moment](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/moment/moment?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+# [Moment.js](http://momentjs.com/)
-[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][downloads-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url]
-[![Coverage Status](https://coveralls.io/repos/moment/moment/badge.svg?branch=develop)](https://coveralls.io/r/moment/moment?branch=develop)
-[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_shield)
-[![SemVer compatibility](https://api.dependabot.com/badges/compatibility_score?dependency-name=moment&package-manager=npm_and_yarn&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=moment&package-manager=npm_and_yarn&version-scheme=semver)
+[![NPM version][npm-version-image]][npm-url]
+[![NPM downloads][npm-downloads-image]][npm-downloads-url]
+[![MIT License][license-image]][license-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+[![FOSSA Status][fossa-badge-image]][fossa-badge-url]
+[![SemVer compatibility][semver-image]][semver-url]
-A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
+A JavaScript date library for parsing, validating, manipulating, and formatting dates.
-**[Documentation](http://momentjs.com/docs/)**
+## Project Status
-## Port to ECMAScript 6 (version 2.10.0)
+Moment.js is a legacy project, now in maintenance mode. In most cases, you should choose a different library.
-Moment 2.10.0 does not bring any new features, but the code is now written in
-ECMAScript 6 modules and placed inside `src/`. Previously `moment.js`, `locale/*.js` and
-`test/moment/*.js`, `test/locale/*.js` contained the source of the project. Now
-the source is in `src/`, temporary build (ECMAScript 5) files are placed under
-`build/umd/` (for running tests during development), and the `moment.js` and
-`locale/*.js` files are updated only on release.
+For more details and recommendations, please see [Project Status](https://momentjs.com/docs/#/-project-status/) in the docs.
-If you want to use a particular revision of the code, make sure to run
-`grunt transpile update-index`, so `moment.js` and `locales/*.js` are synced
-with `src/*`. We might place that in a commit hook in the future.
+*Thank you.*
-## Upgrading to 2.0.0
+## Resources
-There are a number of small backwards incompatible changes with version 2.0.0. [See the full descriptions here](https://gist.github.com/timrwood/e72f2eef320ed9e37c51#backwards-incompatible-changes)
+- [Documentation](https://momentjs.com/docs/)
+- [Changelog](CHANGELOG.md)
+- [Stack Overflow](https://stackoverflow.com/questions/tagged/momentjs)
- * Changed language ordinal method to return the number + ordinal instead of just the ordinal.
-
- * Changed two digit year parsing cutoff to match strptime.
-
- * Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`.
-
- * Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`.
-
- * Removed the lang data objects from the top level namespace.
-
- * Duplicate `Date` passed to `moment()` instead of referencing it.
-
-## [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
-
-## [Contributing](https://github.com/moment/moment/blob/develop/CONTRIBUTING.md) [![Open Source Helpers](https://www.codetriage.com/moment/moment/badges/users.svg)](https://www.codetriage.com/moment/moment)
+## License
-We're looking for co-maintainers! If you want to become a master of time please
-write to [ichernev](https://github.com/ichernev).
+Moment.js is freely distributable under the terms of the [MIT license][license-url].
-In addition to contributing code, you can help to triage issues. This can include reproducing bug reports, or asking for vital information such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to moment/moment on CodeTriage](https://www.codetriage.com/moment/moment).
+[![FOSSA Status][fossa-large-image]][fossa-large-url]
-### Frequently asked questions
+[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat
+[license-url]: LICENSE
-See [FAQ.md](FAQ.md).
+[npm-url]: https://npmjs.org/package/moment
+[npm-version-image]: https://img.shields.io/npm/v/moment.svg?style=flat
-## License
+[npm-downloads-image]: https://img.shields.io/npm/dm/moment.svg?style=flat
+[npm-downloads-url]: https://npmcharts.com/compare/moment?minimal=true
-Moment.js is freely distributable under the terms of the [MIT license](https://github.com/moment/moment/blob/develop/LICENSE).
+[travis-url]: https://travis-ci.org/moment/moment
+[travis-image]: https://img.shields.io/travis/moment/moment/develop.svg?style=flat
-[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_large)
+[coveralls-image]: https://coveralls.io/repos/moment/moment/badge.svg?branch=develop
+[coveralls-url]: https://coveralls.io/r/moment/moment?branch=develop
-[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
-[license-url]: LICENSE
+[fossa-badge-image]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment.svg?type=shield
+[fossa-badge-url]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_shield
-[npm-url]: https://npmjs.org/package/moment
-[npm-version-image]: http://img.shields.io/npm/v/moment.svg?style=flat
-[npm-downloads-image]: http://img.shields.io/npm/dm/moment.svg?style=flat
-[downloads-url]: https://npmcharts.com/compare/moment?minimal=true
+[fossa-large-image]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment.svg?type=large
+[fossa-large-url]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_large
-[travis-url]: http://travis-ci.org/moment/moment
-[travis-image]: http://img.shields.io/travis/moment/moment/develop.svg?style=flat
+[semver-image]: https://api.dependabot.com/badges/compatibility_score?dependency-name=moment&package-manager=npm_and_yarn&version-scheme=semver
+[semver-url]: https://dependabot.com/compatibility-score.html?dependency-name=moment&package-manager=npm_and_yarn&version-scheme=semver
diff --git a/resources/lib/moment/locale/ar-dz.js b/resources/lib/moment/locale/ar-dz.js
index 9ad2ad6e5620..8f9e14916cc6 100644
--- a/resources/lib/moment/locale/ar-dz.js
+++ b/resources/lib/moment/locale/ar-dz.js
@@ -1,6 +1,10 @@
//! moment.js locale configuration
//! locale : Arabic (Algeria) [ar-dz]
-//! author : Noureddine LOUAHEDJ : https://github.com/noureddineme
+//! author : Amine Roukh: https://github.com/Amine27
+//! author : Abdel Said: https://github.com/abdelsaid
+//! author : Ahmed Elkhatib
+//! author : forabi https://github.com/forabi
+//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
@@ -11,48 +15,146 @@
//! moment.js locale configuration
+ var pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months = [
+ 'جانفي',
+ 'فيفري',
+ 'مارس',
+ 'أفريل',
+ 'ماي',
+ 'جوان',
+ 'جويلية',
+ 'أوت',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
var arDz = moment.defineLocale('ar-dz', {
- months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'
- ),
- monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'
- ),
+ months: months,
+ monthsShort: months,
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
+ L: 'D/\u200FM/\u200FYYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
calendar: {
- sameDay: '[اليوم على الساعة] LT',
- nextDay: '[غدا على الساعة] LT',
- nextWeek: 'dddd [على الساعة] LT',
- lastDay: '[أمس على الساعة] LT',
- lastWeek: 'dddd [على الساعة] LT',
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
sameElse: 'L',
},
relativeTime: {
- future: 'في %s',
+ future: 'بعد %s',
past: 'منذ %s',
- s: 'ثوان',
- ss: '%d ثانية',
- m: 'دقيقة',
- mm: '%d دقائق',
- h: 'ساعة',
- hh: '%d ساعات',
- d: 'يوم',
- dd: '%d أيام',
- M: 'شهر',
- MM: '%d أشهر',
- y: 'سنة',
- yy: '%d سنوات',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
},
week: {
dow: 0, // Sunday is the first day of the week.
diff --git a/resources/lib/moment/locale/ar-kw.js b/resources/lib/moment/locale/ar-kw.js
index fcca10c9d467..c6ecef89fe22 100644
--- a/resources/lib/moment/locale/ar-kw.js
+++ b/resources/lib/moment/locale/ar-kw.js
@@ -15,9 +15,10 @@
months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
'_'
),
- monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
- '_'
- ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
diff --git a/resources/lib/moment/locale/ar-ly.js b/resources/lib/moment/locale/ar-ly.js
index 276a02e6c6cf..0ec9ec8dd9ee 100644
--- a/resources/lib/moment/locale/ar-ly.js
+++ b/resources/lib/moment/locale/ar-ly.js
@@ -1,5 +1,5 @@
//! moment.js locale configuration
-//! locale : Arabic (Lybia) [ar-ly]
+//! locale : Arabic (Libya) [ar-ly]
//! author : Ali Hmer: https://github.com/kikoanis
;(function (global, factory) {
@@ -12,29 +12,29 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '1',
- '2': '2',
- '3': '3',
- '4': '4',
- '5': '5',
- '6': '6',
- '7': '7',
- '8': '8',
- '9': '9',
- '0': '0',
+ 1: '1',
+ 2: '2',
+ 3: '3',
+ 4: '4',
+ 5: '5',
+ 6: '6',
+ 7: '7',
+ 8: '8',
+ 9: '9',
+ 0: '0',
},
pluralForm = function (n) {
return n === 0
? 0
: n === 1
- ? 1
- : n === 2
- ? 2
- : n % 100 >= 3 && n % 100 <= 10
- ? 3
- : n % 100 >= 11
- ? 4
- : 5;
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
},
plurals = {
s: [
diff --git a/resources/lib/moment/locale/ar-ma.js b/resources/lib/moment/locale/ar-ma.js
index c21e1f6c3391..11f061a19d3d 100644
--- a/resources/lib/moment/locale/ar-ma.js
+++ b/resources/lib/moment/locale/ar-ma.js
@@ -16,9 +16,10 @@
months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
'_'
),
- monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
- '_'
- ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
@@ -56,8 +57,8 @@
yy: '%d سنوات',
},
week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12, // The week that contains Jan 12th is the first week of the year.
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
diff --git a/resources/lib/moment/locale/ar-ps.js b/resources/lib/moment/locale/ar-ps.js
new file mode 100644
index 000000000000..4533bfa607aa
--- /dev/null
+++ b/resources/lib/moment/locale/ar-ps.js
@@ -0,0 +1,123 @@
+//! moment.js locale configuration
+//! locale : Arabic (Palestine) [ar-ps]
+//! author : Majd Al-Shihabi : https://github.com/majdal
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ };
+
+ var arPs = moment.defineLocale('ar-ps', {
+ months: 'كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١'.split('_'),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .split('') // reversed since negative lookbehind not supported everywhere
+ .reverse()
+ .join('')
+ .replace(/[١٢](?![\u062a\u0643])/g, function (match) {
+ return numberMap[match];
+ })
+ .split('')
+ .reverse()
+ .join('')
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return arPs;
+
+})));
diff --git a/resources/lib/moment/locale/ar-sa.js b/resources/lib/moment/locale/ar-sa.js
index 44f9ff9be357..e329df08b0d8 100644
--- a/resources/lib/moment/locale/ar-sa.js
+++ b/resources/lib/moment/locale/ar-sa.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '١',
- '2': '٢',
- '3': '٣',
- '4': '٤',
- '5': '٥',
- '6': '٦',
- '7': '٧',
- '8': '٨',
- '9': '٩',
- '0': '٠',
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
},
numberMap = {
'١': '1',
@@ -40,9 +40,10 @@
months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
'_'
),
- monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'
- ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
diff --git a/resources/lib/moment/locale/ar-tn.js b/resources/lib/moment/locale/ar-tn.js
index a32af75fdabd..a390ed22949e 100644
--- a/resources/lib/moment/locale/ar-tn.js
+++ b/resources/lib/moment/locale/ar-tn.js
@@ -15,9 +15,10 @@
months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
'_'
),
- monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'
- ),
+ monthsShort:
+ 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
diff --git a/resources/lib/moment/locale/ar.js b/resources/lib/moment/locale/ar.js
index 4c3e041edd70..5bfb05748974 100644
--- a/resources/lib/moment/locale/ar.js
+++ b/resources/lib/moment/locale/ar.js
@@ -14,16 +14,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '١',
- '2': '٢',
- '3': '٣',
- '4': '٤',
- '5': '٥',
- '6': '٦',
- '7': '٧',
- '8': '٨',
- '9': '٩',
- '0': '٠',
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
},
numberMap = {
'١': '1',
@@ -41,14 +41,14 @@
return n === 0
? 0
: n === 1
- ? 1
- : n === 2
- ? 2
- : n % 100 >= 3 && n % 100 <= 10
- ? 3
- : n % 100 >= 11
- ? 4
- : 5;
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
},
plurals = {
s: [
diff --git a/resources/lib/moment/locale/az.js b/resources/lib/moment/locale/az.js
index f68ad1735513..472bee160e8c 100644
--- a/resources/lib/moment/locale/az.js
+++ b/resources/lib/moment/locale/az.js
@@ -37,9 +37,10 @@
'_'
),
monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
- weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
- '_'
- ),
+ weekdays:
+ 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
+ '_'
+ ),
weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
weekdaysParseExact: true,
@@ -62,7 +63,7 @@
relativeTime: {
future: '%s sonra',
past: '%s əvvəl',
- s: 'birneçə saniyə',
+ s: 'bir neçə saniyə',
ss: '%d saniyə',
m: 'bir dəqiqə',
mm: '%d dəqiqə',
diff --git a/resources/lib/moment/locale/be.js b/resources/lib/moment/locale/be.js
index 0768acbfa958..fd7e772bb386 100644
--- a/resources/lib/moment/locale/be.js
+++ b/resources/lib/moment/locale/be.js
@@ -18,8 +18,8 @@
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];
+ ? forms[1]
+ : forms[2];
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
@@ -44,20 +44,21 @@
format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
'_'
),
- standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
- '_'
- ),
+ standalone:
+ 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
+ '_'
+ ),
},
- monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split(
- '_'
- ),
+ monthsShort:
+ 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
weekdays: {
format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
'_'
),
- standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
- '_'
- ),
+ standalone:
+ 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
+ '_'
+ ),
isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
},
weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
diff --git a/resources/lib/moment/locale/bg.js b/resources/lib/moment/locale/bg.js
index 05b6cf8ed2c6..5a1bda825b99 100644
--- a/resources/lib/moment/locale/bg.js
+++ b/resources/lib/moment/locale/bg.js
@@ -60,6 +60,8 @@
hh: '%d часа',
d: 'ден',
dd: '%d дена',
+ w: 'седмица',
+ ww: '%d седмици',
M: 'месец',
MM: '%d месеца',
y: 'година',
diff --git a/resources/lib/moment/locale/bn-bd.js b/resources/lib/moment/locale/bn-bd.js
new file mode 100644
index 000000000000..1154aa4efc6b
--- /dev/null
+++ b/resources/lib/moment/locale/bn-bd.js
@@ -0,0 +1,140 @@
+//! moment.js locale configuration
+//! locale : Bengali (Bangladesh) [bn-bd]
+//! author : Asraf Hossain Patoary : https://github.com/ashwoolford
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
+ },
+ numberMap = {
+ '১': '1',
+ '২': '2',
+ '৩': '3',
+ '৪': '4',
+ '৫': '5',
+ '৬': '6',
+ '৭': '7',
+ '৮': '8',
+ '৯': '9',
+ '০': '0',
+ };
+
+ var bnBd = moment.defineLocale('bn-bd', {
+ months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
+ '_'
+ ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
+ weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
+ '_'
+ ),
+ weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+ weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm সময়',
+ LTS: 'A h:mm:ss সময়',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm সময়',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
+ },
+ calendar: {
+ sameDay: '[আজ] LT',
+ nextDay: '[আগামীকাল] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[গতকাল] LT',
+ lastWeek: '[গত] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s পরে',
+ past: '%s আগে',
+ s: 'কয়েক সেকেন্ড',
+ ss: '%d সেকেন্ড',
+ m: 'এক মিনিট',
+ mm: '%d মিনিট',
+ h: 'এক ঘন্টা',
+ hh: '%d ঘন্টা',
+ d: 'এক দিন',
+ dd: '%d দিন',
+ M: 'এক মাস',
+ MM: '%d মাস',
+ y: 'এক বছর',
+ yy: '%d বছর',
+ },
+ preparse: function (string) {
+ return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+
+ meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'রাত') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ভোর') {
+ return hour;
+ } else if (meridiem === 'সকাল') {
+ return hour;
+ } else if (meridiem === 'দুপুর') {
+ return hour >= 3 ? hour : hour + 12;
+ } else if (meridiem === 'বিকাল') {
+ return hour + 12;
+ } else if (meridiem === 'সন্ধ্যা') {
+ return hour + 12;
+ }
+ },
+
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'রাত';
+ } else if (hour < 6) {
+ return 'ভোর';
+ } else if (hour < 12) {
+ return 'সকাল';
+ } else if (hour < 15) {
+ return 'দুপুর';
+ } else if (hour < 18) {
+ return 'বিকাল';
+ } else if (hour < 20) {
+ return 'সন্ধ্যা';
+ } else {
+ return 'রাত';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return bnBd;
+
+})));
diff --git a/resources/lib/moment/locale/bn.js b/resources/lib/moment/locale/bn.js
index e97f0f61d83a..e5e3e5f51996 100644
--- a/resources/lib/moment/locale/bn.js
+++ b/resources/lib/moment/locale/bn.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '১',
- '2': '২',
- '3': '৩',
- '4': '৪',
- '5': '৫',
- '6': '৬',
- '7': '৭',
- '8': '৮',
- '9': '৯',
- '0': '০',
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
},
numberMap = {
'১': '1',
@@ -40,9 +40,10 @@
months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
'_'
),
- monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
- '_'
- ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
'_'
),
diff --git a/resources/lib/moment/locale/bo.js b/resources/lib/moment/locale/bo.js
index 1b514e4b98b1..c4a7c5210982 100644
--- a/resources/lib/moment/locale/bo.js
+++ b/resources/lib/moment/locale/bo.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '༡',
- '2': '༢',
- '3': '༣',
- '4': '༤',
- '5': '༥',
- '6': '༦',
- '7': '༧',
- '8': '༨',
- '9': '༩',
- '0': '༠',
+ 1: '༡',
+ 2: '༢',
+ 3: '༣',
+ 4: '༤',
+ 5: '༥',
+ 6: '༦',
+ 7: '༧',
+ 8: '༨',
+ 9: '༩',
+ 0: '༠',
},
numberMap = {
'༡': '1',
@@ -40,14 +40,16 @@
months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
'_'
),
- monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
- '_'
- ),
+ monthsShort:
+ 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
+ '_'
+ ),
monthsShortRegex: /^(ཟླ་\d{1,2})/,
monthsParseExact: true,
- weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
- '_'
- ),
+ weekdays:
+ 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
+ '_'
+ ),
weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
'_'
),
diff --git a/resources/lib/moment/locale/br.js b/resources/lib/moment/locale/br.js
index ee8cdb9e9751..bd047fe435d7 100644
--- a/resources/lib/moment/locale/br.js
+++ b/resources/lib/moment/locale/br.js
@@ -55,15 +55,75 @@
return mutationTable[text.charAt(0)] + text.substring(1);
}
+ var monthsParse = [
+ /^gen/i,
+ /^c[ʼ\']hwe/i,
+ /^meu/i,
+ /^ebr/i,
+ /^mae/i,
+ /^(mez|eve)/i,
+ /^gou/i,
+ /^eos/i,
+ /^gwe/i,
+ /^her/i,
+ /^du/i,
+ /^ker/i,
+ ],
+ monthsRegex =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ monthsStrictRegex =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
+ monthsShortStrictRegex =
+ /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ fullWeekdaysParse = [
+ /^sul/i,
+ /^lun/i,
+ /^meurzh/i,
+ /^merc[ʼ\']her/i,
+ /^yaou/i,
+ /^gwener/i,
+ /^sadorn/i,
+ ],
+ shortWeekdaysParse = [
+ /^Sul/i,
+ /^Lun/i,
+ /^Meu/i,
+ /^Mer/i,
+ /^Yao/i,
+ /^Gwe/i,
+ /^Sad/i,
+ ],
+ minWeekdaysParse = [
+ /^Su/i,
+ /^Lu/i,
+ /^Me([^r]|$)/i,
+ /^Mer/i,
+ /^Ya/i,
+ /^Gw/i,
+ /^Sa/i,
+ ];
+
var br = moment.defineLocale('br', {
- months: "Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split(
+ months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
'_'
),
- monthsShort: "Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split('_'),
- weekdays: "Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split('_'),
+ monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
+ weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
- weekdaysParseExact: true,
+ weekdaysParse: minWeekdaysParse,
+ fullWeekdaysParse: fullWeekdaysParse,
+ shortWeekdaysParse: shortWeekdaysParse,
+ minWeekdaysParse: minWeekdaysParse,
+
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex: monthsStrictRegex,
+ monthsShortStrictRegex: monthsShortStrictRegex,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
@@ -74,15 +134,15 @@
},
calendar: {
sameDay: '[Hiziv da] LT',
- nextDay: "[Warc'hoazh da] LT",
+ nextDay: '[Warcʼhoazh da] LT',
nextWeek: 'dddd [da] LT',
- lastDay: "[Dec'h da] LT",
+ lastDay: '[Decʼh da] LT',
lastWeek: 'dddd [paset da] LT',
sameElse: 'L',
},
relativeTime: {
future: 'a-benn %s',
- past: "%s 'zo",
+ past: '%s ʼzo',
s: 'un nebeud segondennoù',
ss: '%d eilenn',
m: 'ur vunutenn',
@@ -105,6 +165,13 @@
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
+ meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
+ isPM: function (token) {
+ return token === 'g.m.';
+ },
+ meridiem: function (hour, minute, isLower) {
+ return hour < 12 ? 'a.m.' : 'g.m.';
+ },
});
return br;
diff --git a/resources/lib/moment/locale/bs.js b/resources/lib/moment/locale/bs.js
index 6086f0a9a1f0..55a4d80c9e8c 100644
--- a/resources/lib/moment/locale/bs.js
+++ b/resources/lib/moment/locale/bs.js
@@ -1,6 +1,7 @@
//! moment.js locale configuration
//! locale : Bosnian [bs]
//! author : Nedim Cholich : https://github.com/frontyard
+//! author : Rasid Redzic : https://github.com/rasidre
//! based on (hr) translation by Bojan Marković
;(function (global, factory) {
@@ -12,6 +13,17 @@
//! moment.js locale configuration
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ switch (key) {
+ case 'm':
+ return withoutSuffix
+ ? 'jedna minuta'
+ : isFuture
+ ? 'jednu minutu'
+ : 'jedne minute';
+ }
+ }
+
function translate(number, withoutSuffix, key) {
var result = number + ' ';
switch (key) {
@@ -24,8 +36,6 @@
result += 'sekundi';
}
return result;
- case 'm':
- return withoutSuffix ? 'jedna minuta' : 'jedne minute';
case 'mm':
if (number === 1) {
result += 'minuta';
@@ -36,7 +46,7 @@
}
return result;
case 'h':
- return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ return withoutSuffix ? 'jedan sat' : 'jedan sat';
case 'hh':
if (number === 1) {
result += 'sat';
@@ -78,9 +88,10 @@
months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
'_'
),
- monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
- '_'
- ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
'_'
@@ -136,7 +147,7 @@
past: 'prije %s',
s: 'par sekundi',
ss: translate,
- m: translate,
+ m: processRelativeTime,
mm: translate,
h: translate,
hh: translate,
diff --git a/resources/lib/moment/locale/ca.js b/resources/lib/moment/locale/ca.js
index c603b9763870..50f264caf6e2 100644
--- a/resources/lib/moment/locale/ca.js
+++ b/resources/lib/moment/locale/ca.js
@@ -13,21 +13,24 @@
var ca = moment.defineLocale('ca', {
months: {
- standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
- '_'
- ),
+ standalone:
+ 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
+ '_'
+ ),
format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
'_'
),
isFormat: /D[oD]?(\s)+MMMM/,
},
- monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
- '_'
- ),
+ monthsShort:
+ 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
+ '_'
+ ),
monthsParseExact: true,
- weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
- '_'
- ),
+ weekdays:
+ 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
+ '_'
+ ),
weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
weekdaysParseExact: true,
@@ -86,12 +89,12 @@
number === 1
? 'r'
: number === 2
- ? 'n'
- : number === 3
- ? 'r'
- : number === 4
- ? 't'
- : 'è';
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
if (period === 'w' || period === 'W') {
output = 'a';
}
diff --git a/resources/lib/moment/locale/cs.js b/resources/lib/moment/locale/cs.js
index ec25c413a324..7cd88321c35c 100644
--- a/resources/lib/moment/locale/cs.js
+++ b/resources/lib/moment/locale/cs.js
@@ -11,9 +11,16 @@
//! moment.js locale configuration
- var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
- '_'
- ),
+ var months = {
+ standalone:
+ 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
+ '_'
+ ),
+ format: 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(
+ '_'
+ ),
+ isFormat: /DD?[o.]?(\[[^\[\]]*\]|\s)+MMMM/,
+ },
monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
monthsParse = [
/^led/i,
@@ -31,7 +38,8 @@
],
// NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
// Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
- monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
+ monthsRegex =
+ /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
function plural(n) {
return n > 1 && n < 5 && ~~(n / 10) !== 1;
@@ -97,8 +105,10 @@
monthsShortRegex: monthsRegex,
// NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
// Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
- monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
- monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
+ monthsStrictRegex:
+ /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
+ monthsShortStrictRegex:
+ /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
diff --git a/resources/lib/moment/locale/cv.js b/resources/lib/moment/locale/cv.js
index 891eb00c93ef..6749d4828c87 100644
--- a/resources/lib/moment/locale/cv.js
+++ b/resources/lib/moment/locale/cv.js
@@ -16,9 +16,10 @@
'_'
),
monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
- weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
- '_'
- ),
+ weekdays:
+ 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
+ '_'
+ ),
weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
longDateFormat: {
@@ -42,8 +43,8 @@
var affix = /сехет$/i.exec(output)
? 'рен'
: /ҫул$/i.exec(output)
- ? 'тан'
- : 'ран';
+ ? 'тан'
+ : 'ран';
return output + affix;
},
past: '%s каялла',
diff --git a/resources/lib/moment/locale/cy.js b/resources/lib/moment/locale/cy.js
index 1bcd649a2e69..3b987f277e50 100644
--- a/resources/lib/moment/locale/cy.js
+++ b/resources/lib/moment/locale/cy.js
@@ -19,9 +19,10 @@
monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
'_'
),
- weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
- '_'
- ),
+ weekdays:
+ 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
+ '_'
+ ),
weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
weekdaysParseExact: true,
diff --git a/resources/lib/moment/locale/de-at.js b/resources/lib/moment/locale/de-at.js
index 5346e19ed07a..7c3130284db8 100644
--- a/resources/lib/moment/locale/de-at.js
+++ b/resources/lib/moment/locale/de-at.js
@@ -20,6 +20,7 @@
h: ['eine Stunde', 'einer Stunde'],
d: ['ein Tag', 'einem Tag'],
dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
M: ['ein Monat', 'einem Monat'],
MM: [number + ' Monate', number + ' Monaten'],
y: ['ein Jahr', 'einem Jahr'],
@@ -32,13 +33,13 @@
months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
'_'
),
- monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
- '_'
- ),
+ monthsShort:
+ 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
monthsParseExact: true,
- weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
- '_'
- ),
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
weekdaysParseExact: true,
@@ -69,6 +70,8 @@
hh: '%d Stunden',
d: processRelativeTime,
dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
diff --git a/resources/lib/moment/locale/de-ch.js b/resources/lib/moment/locale/de-ch.js
index dbcdd59225c1..10fed176d2ce 100644
--- a/resources/lib/moment/locale/de-ch.js
+++ b/resources/lib/moment/locale/de-ch.js
@@ -17,6 +17,7 @@
h: ['eine Stunde', 'einer Stunde'],
d: ['ein Tag', 'einem Tag'],
dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
M: ['ein Monat', 'einem Monat'],
MM: [number + ' Monate', number + ' Monaten'],
y: ['ein Jahr', 'einem Jahr'],
@@ -29,13 +30,13 @@
months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
'_'
),
- monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
- '_'
- ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
monthsParseExact: true,
- weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
- '_'
- ),
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
weekdaysParseExact: true,
@@ -66,6 +67,8 @@
hh: '%d Stunden',
d: processRelativeTime,
dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
diff --git a/resources/lib/moment/locale/de.js b/resources/lib/moment/locale/de.js
index e29ec2c64cd8..cc061ebf46f4 100644
--- a/resources/lib/moment/locale/de.js
+++ b/resources/lib/moment/locale/de.js
@@ -19,6 +19,7 @@
h: ['eine Stunde', 'einer Stunde'],
d: ['ein Tag', 'einem Tag'],
dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
M: ['ein Monat', 'einem Monat'],
MM: [number + ' Monate', number + ' Monaten'],
y: ['ein Jahr', 'einem Jahr'],
@@ -31,13 +32,13 @@
months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
'_'
),
- monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
- '_'
- ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
monthsParseExact: true,
- weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
- '_'
- ),
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
weekdaysParseExact: true,
@@ -68,6 +69,8 @@
hh: '%d Stunden',
d: processRelativeTime,
dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
diff --git a/resources/lib/moment/locale/el.js b/resources/lib/moment/locale/el.js
index 5ffc0fb7b972..a14785979acf 100644
--- a/resources/lib/moment/locale/el.js
+++ b/resources/lib/moment/locale/el.js
@@ -19,12 +19,14 @@
}
var el = moment.defineLocale('el', {
- monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
- '_'
- ),
- monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
- '_'
- ),
+ monthsNominativeEl:
+ 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
+ '_'
+ ),
+ monthsGenitiveEl:
+ 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
+ '_'
+ ),
months: function (momentToFormat, format) {
if (!momentToFormat) {
return this._monthsNominativeEl;
diff --git a/resources/lib/moment/locale/en-au.js b/resources/lib/moment/locale/en-au.js
index d415e2bdb3d6..869f51d1f9f6 100644
--- a/resources/lib/moment/locale/en-au.js
+++ b/resources/lib/moment/locale/en-au.js
@@ -60,16 +60,16 @@
~~((number % 100) / 10) === 1
? 'th'
: b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
return number + output;
},
week: {
- dow: 1, // Monday is the first day of the week.
+ dow: 0, // Sunday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
diff --git a/resources/lib/moment/locale/en-ca.js b/resources/lib/moment/locale/en-ca.js
index bc574f1a4187..29a33906a4b2 100644
--- a/resources/lib/moment/locale/en-ca.js
+++ b/resources/lib/moment/locale/en-ca.js
@@ -60,12 +60,12 @@
~~((number % 100) / 10) === 1
? 'th'
: b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
return number + output;
},
});
diff --git a/resources/lib/moment/locale/en-gb.js b/resources/lib/moment/locale/en-gb.js
index 828791e259b7..a159749de5a3 100644
--- a/resources/lib/moment/locale/en-gb.js
+++ b/resources/lib/moment/locale/en-gb.js
@@ -60,12 +60,12 @@
~~((number % 100) / 10) === 1
? 'th'
: b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
return number + output;
},
week: {
diff --git a/resources/lib/moment/locale/en-ie.js b/resources/lib/moment/locale/en-ie.js
index 086cf395d5e1..bbde281450de 100644
--- a/resources/lib/moment/locale/en-ie.js
+++ b/resources/lib/moment/locale/en-ie.js
@@ -60,12 +60,12 @@
~~((number % 100) / 10) === 1
? 'th'
: b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
return number + output;
},
week: {
diff --git a/resources/lib/moment/locale/en-il.js b/resources/lib/moment/locale/en-il.js
index e52503ce8349..c9c567a98f85 100644
--- a/resources/lib/moment/locale/en-il.js
+++ b/resources/lib/moment/locale/en-il.js
@@ -60,12 +60,12 @@
~~((number % 100) / 10) === 1
? 'th'
: b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
return number + output;
},
});
diff --git a/resources/lib/moment/locale/en-in.js b/resources/lib/moment/locale/en-in.js
index 68db5108a343..c10fb4bb9f0b 100644
--- a/resources/lib/moment/locale/en-in.js
+++ b/resources/lib/moment/locale/en-in.js
@@ -60,17 +60,17 @@
~~((number % 100) / 10) === 1
? 'th'
: b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
return number + output;
},
week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 1st is the first week of the year.
},
});
diff --git a/resources/lib/moment/locale/en-nz.js b/resources/lib/moment/locale/en-nz.js
index 3bc7e9f60d9b..3a9d88fc6413 100644
--- a/resources/lib/moment/locale/en-nz.js
+++ b/resources/lib/moment/locale/en-nz.js
@@ -60,12 +60,12 @@
~~((number % 100) / 10) === 1
? 'th'
: b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
return number + output;
},
week: {
diff --git a/resources/lib/moment/locale/en-sg.js b/resources/lib/moment/locale/en-sg.js
index 4de803c133ca..f7805ad49b7e 100644
--- a/resources/lib/moment/locale/en-sg.js
+++ b/resources/lib/moment/locale/en-sg.js
@@ -60,12 +60,12 @@
~~((number % 100) / 10) === 1
? 'th'
: b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
return number + output;
},
week: {
diff --git a/resources/lib/moment/locale/es-do.js b/resources/lib/moment/locale/es-do.js
index d550f1130fbe..8a557c331255 100644
--- a/resources/lib/moment/locale/es-do.js
+++ b/resources/lib/moment/locale/es-do.js
@@ -10,9 +10,10 @@
//! moment.js locale configuration
- var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
- '_'
- ),
+ var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
monthsParse = [
/^ene/i,
@@ -28,7 +29,8 @@
/^nov/i,
/^dic/i,
],
- monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
var esDo = moment.defineLocale('es-do', {
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
@@ -45,8 +47,10 @@
},
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
@@ -95,6 +99,8 @@
hh: '%d horas',
d: 'un día',
dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
M: 'un mes',
MM: '%d meses',
y: 'un año',
diff --git a/resources/lib/moment/locale/es-mx.js b/resources/lib/moment/locale/es-mx.js
new file mode 100644
index 000000000000..a233e402ebc3
--- /dev/null
+++ b/resources/lib/moment/locale/es-mx.js
@@ -0,0 +1,121 @@
+//! moment.js locale configuration
+//! locale : Spanish (Mexico) [es-mx]
+//! author : JC Franco : https://github.com/jcfranco
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ var esMx = moment.defineLocale('es-mx', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ invalidDate: 'Fecha inválida',
+ });
+
+ return esMx;
+
+})));
diff --git a/resources/lib/moment/locale/es-us.js b/resources/lib/moment/locale/es-us.js
index c0207eb02a10..2c52254cdf3a 100644
--- a/resources/lib/moment/locale/es-us.js
+++ b/resources/lib/moment/locale/es-us.js
@@ -12,9 +12,10 @@
//! moment.js locale configuration
- var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
- '_'
- ),
+ var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
monthsParse = [
/^ene/i,
@@ -30,7 +31,8 @@
/^nov/i,
/^dic/i,
],
- monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
var esUs = moment.defineLocale('es-us', {
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
@@ -47,8 +49,10 @@
},
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
@@ -97,6 +101,8 @@
hh: '%d horas',
d: 'un día',
dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
M: 'un mes',
MM: '%d meses',
y: 'un año',
diff --git a/resources/lib/moment/locale/es.js b/resources/lib/moment/locale/es.js
index e4e6d4166500..7fc46286a267 100644
--- a/resources/lib/moment/locale/es.js
+++ b/resources/lib/moment/locale/es.js
@@ -11,9 +11,10 @@
//! moment.js locale configuration
- var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
- '_'
- ),
+ var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
monthsParse = [
/^ene/i,
@@ -29,7 +30,8 @@
/^nov/i,
/^dic/i,
],
- monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
var es = moment.defineLocale('es', {
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
@@ -46,8 +48,10 @@
},
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
@@ -96,6 +100,8 @@
hh: '%d horas',
d: 'un día',
dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
M: 'un mes',
MM: '%d meses',
y: 'un año',
@@ -107,7 +113,7 @@
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
- invalidDate: 'Fecha invalida',
+ invalidDate: 'Fecha inválida',
});
return es;
diff --git a/resources/lib/moment/locale/et.js b/resources/lib/moment/locale/et.js
index d5ec94e0bced..7c8760d8bcef 100644
--- a/resources/lib/moment/locale/et.js
+++ b/resources/lib/moment/locale/et.js
@@ -36,12 +36,12 @@
months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
'_'
),
- monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split(
- '_'
- ),
- weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
- '_'
- ),
+ monthsShort:
+ 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
+ weekdays:
+ 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
+ '_'
+ ),
weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
longDateFormat: {
diff --git a/resources/lib/moment/locale/eu.js b/resources/lib/moment/locale/eu.js
index b9843a476a0e..ca2e547633f9 100644
--- a/resources/lib/moment/locale/eu.js
+++ b/resources/lib/moment/locale/eu.js
@@ -15,13 +15,15 @@
months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
'_'
),
- monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
- '_'
- ),
+ monthsShort:
+ 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
+ '_'
+ ),
monthsParseExact: true,
- weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
- '_'
- ),
+ weekdays:
+ 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
+ '_'
+ ),
weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
weekdaysParseExact: true,
diff --git a/resources/lib/moment/locale/fa.js b/resources/lib/moment/locale/fa.js
index fff48cf702f3..845757b8db54 100644
--- a/resources/lib/moment/locale/fa.js
+++ b/resources/lib/moment/locale/fa.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '۱',
- '2': '۲',
- '3': '۳',
- '4': '۴',
- '5': '۵',
- '6': '۶',
- '7': '۷',
- '8': '۸',
- '9': '۹',
- '0': '۰',
+ 1: '۱',
+ 2: '۲',
+ 3: '۳',
+ 4: '۴',
+ 5: '۵',
+ 6: '۶',
+ 7: '۷',
+ 8: '۸',
+ 9: '۹',
+ 0: '۰',
},
numberMap = {
'۱': '1',
@@ -40,15 +40,18 @@
months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
'_'
),
- monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
- '_'
- ),
- weekdays: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
- '_'
- ),
- weekdaysShort: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
- '_'
- ),
+ monthsShort:
+ 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
+ '_'
+ ),
+ weekdays:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
diff --git a/resources/lib/moment/locale/fi.js b/resources/lib/moment/locale/fi.js
index c47f735206c9..07e57cf6e4dc 100644
--- a/resources/lib/moment/locale/fi.js
+++ b/resources/lib/moment/locale/fi.js
@@ -11,9 +11,10 @@
//! moment.js locale configuration
- var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
- ' '
- ),
+ var numbersPast =
+ 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
+ ' '
+ ),
numbersFuture = [
'nolla',
'yhden',
@@ -32,7 +33,8 @@
case 's':
return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
case 'ss':
- return isFuture ? 'sekunnin' : 'sekuntia';
+ result = isFuture ? 'sekunnin' : 'sekuntia';
+ break;
case 'm':
return isFuture ? 'minuutin' : 'minuutti';
case 'mm':
@@ -74,12 +76,14 @@
months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
'_'
),
- monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
- '_'
- ),
- weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
- '_'
- ),
+ monthsShort:
+ 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
+ '_'
+ ),
+ weekdays:
+ 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
+ '_'
+ ),
weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
longDateFormat: {
diff --git a/resources/lib/moment/locale/fo.js b/resources/lib/moment/locale/fo.js
index 94c4f3555402..217fcfbb32bc 100644
--- a/resources/lib/moment/locale/fo.js
+++ b/resources/lib/moment/locale/fo.js
@@ -17,9 +17,10 @@
'_'
),
monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
- weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
- '_'
- ),
+ weekdays:
+ 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
+ '_'
+ ),
weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
longDateFormat: {
diff --git a/resources/lib/moment/locale/fr-ca.js b/resources/lib/moment/locale/fr-ca.js
index a170e973573b..7d48fd7b71da 100644
--- a/resources/lib/moment/locale/fr-ca.js
+++ b/resources/lib/moment/locale/fr-ca.js
@@ -15,9 +15,10 @@
months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
'_'
),
- monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
- '_'
- ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
diff --git a/resources/lib/moment/locale/fr-ch.js b/resources/lib/moment/locale/fr-ch.js
index d371fa71d705..c28d81cfb76c 100644
--- a/resources/lib/moment/locale/fr-ch.js
+++ b/resources/lib/moment/locale/fr-ch.js
@@ -15,9 +15,10 @@
months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
'_'
),
- monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
- '_'
- ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
diff --git a/resources/lib/moment/locale/fr.js b/resources/lib/moment/locale/fr.js
index e79d52e0ef97..4e5536b49b88 100644
--- a/resources/lib/moment/locale/fr.js
+++ b/resources/lib/moment/locale/fr.js
@@ -11,14 +11,42 @@
//! moment.js locale configuration
+ var monthsStrictRegex =
+ /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsShortStrictRegex =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
+ monthsRegex =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsParse = [
+ /^janv/i,
+ /^févr/i,
+ /^mars/i,
+ /^avr/i,
+ /^mai/i,
+ /^juin/i,
+ /^juil/i,
+ /^août/i,
+ /^sept/i,
+ /^oct/i,
+ /^nov/i,
+ /^déc/i,
+ ];
+
var fr = moment.defineLocale('fr', {
months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
'_'
),
- monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
- '_'
- ),
- monthsParseExact: true,
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex: monthsStrictRegex,
+ monthsShortStrictRegex: monthsShortStrictRegex,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
@@ -50,6 +78,8 @@
hh: '%d heures',
d: 'un jour',
dd: '%d jours',
+ w: 'une semaine',
+ ww: '%d semaines',
M: 'un mois',
MM: '%d mois',
y: 'un an',
diff --git a/resources/lib/moment/locale/fy.js b/resources/lib/moment/locale/fy.js
index ed5da084be82..46cac083d767 100644
--- a/resources/lib/moment/locale/fy.js
+++ b/resources/lib/moment/locale/fy.js
@@ -11,12 +11,10 @@
//! moment.js locale configuration
- var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split(
- '_'
- ),
- monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split(
- '_'
- );
+ var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
var fy = moment.defineLocale('fy', {
months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
diff --git a/resources/lib/moment/locale/gl.js b/resources/lib/moment/locale/gl.js
index a663e20e0f24..16dcb5ab0f81 100644
--- a/resources/lib/moment/locale/gl.js
+++ b/resources/lib/moment/locale/gl.js
@@ -15,9 +15,10 @@
months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
'_'
),
- monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
- '_'
- ),
+ monthsShort:
+ 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
diff --git a/resources/lib/moment/locale/gom-deva.js b/resources/lib/moment/locale/gom-deva.js
index eae9364aa048..ae93d0d16ba1 100644
--- a/resources/lib/moment/locale/gom-deva.js
+++ b/resources/lib/moment/locale/gom-deva.js
@@ -31,17 +31,19 @@
var gomDeva = moment.defineLocale('gom-deva', {
months: {
- standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
- '_'
- ),
+ standalone:
+ 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
+ '_'
+ ),
format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
'_'
),
isFormat: /MMMM(\s)+D[oD]?/,
},
- monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
- '_'
- ),
+ monthsShort:
+ 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
@@ -97,8 +99,8 @@
}
},
week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
},
meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
meridiemHour: function (hour, meridiem) {
diff --git a/resources/lib/moment/locale/gom-latn.js b/resources/lib/moment/locale/gom-latn.js
index 8be90c2e934a..93cbe159bf0f 100644
--- a/resources/lib/moment/locale/gom-latn.js
+++ b/resources/lib/moment/locale/gom-latn.js
@@ -31,17 +31,17 @@
var gomLatn = moment.defineLocale('gom-latn', {
months: {
- standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
- '_'
- ),
+ standalone:
+ 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
+ '_'
+ ),
format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
'_'
),
isFormat: /MMMM(\s)+D[oD]?/,
},
- monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split(
- '_'
- ),
+ monthsShort:
+ 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
monthsParseExact: true,
weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
@@ -97,8 +97,8 @@
}
},
week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
},
meridiemParse: /rati|sokallim|donparam|sanje/,
meridiemHour: function (hour, meridiem) {
diff --git a/resources/lib/moment/locale/gu.js b/resources/lib/moment/locale/gu.js
index d5e5d956148e..6583f7763a7f 100644
--- a/resources/lib/moment/locale/gu.js
+++ b/resources/lib/moment/locale/gu.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '૧',
- '2': '૨',
- '3': '૩',
- '4': '૪',
- '5': '૫',
- '6': '૬',
- '7': '૭',
- '8': '૮',
- '9': '૯',
- '0': '૦',
+ 1: '૧',
+ 2: '૨',
+ 3: '૩',
+ 4: '૪',
+ 5: '૫',
+ 6: '૬',
+ 7: '૭',
+ 8: '૮',
+ 9: '૯',
+ 0: '૦',
},
numberMap = {
'૧': '1',
@@ -40,9 +40,10 @@
months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
'_'
),
- monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
- '_'
- ),
+ monthsShort:
+ 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
'_'
@@ -67,7 +68,7 @@
},
relativeTime: {
future: '%s મા',
- past: '%s પેહલા',
+ past: '%s પહેલા',
s: 'અમુક પળો',
ss: '%d સેકંડ',
m: 'એક મિનિટ',
diff --git a/resources/lib/moment/locale/he.js b/resources/lib/moment/locale/he.js
index 00fc4311b8b7..e19a0f984e52 100644
--- a/resources/lib/moment/locale/he.js
+++ b/resources/lib/moment/locale/he.js
@@ -17,9 +17,8 @@
months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
'_'
),
- monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split(
- '_'
- ),
+ monthsShort:
+ 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
@@ -81,7 +80,8 @@
return number + ' שנים';
},
},
- meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
+ meridiemParse:
+ /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
isPM: function (input) {
return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
},
diff --git a/resources/lib/moment/locale/hi.js b/resources/lib/moment/locale/hi.js
index 3615f4d0907c..56515bdc1e40 100644
--- a/resources/lib/moment/locale/hi.js
+++ b/resources/lib/moment/locale/hi.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '१',
- '2': '२',
- '3': '३',
- '4': '४',
- '5': '५',
- '6': '६',
- '7': '७',
- '8': '८',
- '9': '९',
- '0': '०',
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
},
numberMap = {
'१': '1',
@@ -34,16 +34,48 @@
'८': '8',
'९': '9',
'०': '0',
- };
+ },
+ monthsParse = [
+ /^जन/i,
+ /^फ़र|फर/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सितं|सित/i,
+ /^अक्टू/i,
+ /^नव|नवं/i,
+ /^दिसं|दिस/i,
+ ],
+ shortMonthsParse = [
+ /^जन/i,
+ /^फ़र/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सित/i,
+ /^अक्टू/i,
+ /^नव/i,
+ /^दिस/i,
+ ];
var hi = moment.defineLocale('hi', {
- months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
- '_'
- ),
- monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split(
- '_'
- ),
- monthsParseExact: true,
+ months: {
+ format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
+ '_'
+ ),
+ standalone:
+ 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
@@ -55,6 +87,23 @@
LLL: 'D MMMM YYYY, A h:mm बजे',
LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
},
+
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: shortMonthsParse,
+
+ monthsRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsShortRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsStrictRegex:
+ /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
+
+ monthsShortStrictRegex:
+ /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
+
calendar: {
sameDay: '[आज] LT',
nextDay: '[कल] LT',
diff --git a/resources/lib/moment/locale/hr.js b/resources/lib/moment/locale/hr.js
index 6184618ff968..f41cce061687 100644
--- a/resources/lib/moment/locale/hr.js
+++ b/resources/lib/moment/locale/hr.js
@@ -78,13 +78,15 @@
format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
'_'
),
- standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
+ standalone:
+ 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
'_'
),
- },
- monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
- '_'
- ),
monthsParseExact: true,
weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
'_'
diff --git a/resources/lib/moment/locale/hu.js b/resources/lib/moment/locale/hu.js
index 3a6685c9439f..162959d848ee 100644
--- a/resources/lib/moment/locale/hu.js
+++ b/resources/lib/moment/locale/hu.js
@@ -1,6 +1,7 @@
//! moment.js locale configuration
//! locale : Hungarian [hu]
//! author : Adam Brunner : https://github.com/adambrunner
+//! author : Peter Viszt : https://github.com/passatgt
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
@@ -11,9 +12,8 @@
//! moment.js locale configuration
- var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(
- ' '
- );
+ var weekEndings =
+ 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
function translate(number, withoutSuffix, key, isFuture) {
var num = number;
switch (key) {
@@ -61,9 +61,11 @@
months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
'_'
),
- monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split(
- '_'
- ),
+ monthsShort:
+ 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
diff --git a/resources/lib/moment/locale/hy-am.js b/resources/lib/moment/locale/hy-am.js
index e495232dd11f..9c65b1e92dc1 100644
--- a/resources/lib/moment/locale/hy-am.js
+++ b/resources/lib/moment/locale/hy-am.js
@@ -16,14 +16,16 @@
format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
'_'
),
- standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
- '_'
- ),
+ standalone:
+ 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
+ '_'
+ ),
},
monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
- weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
- '_'
- ),
+ weekdays:
+ 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
+ '_'
+ ),
weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
longDateFormat: {
diff --git a/resources/lib/moment/locale/id.js b/resources/lib/moment/locale/id.js
index 682ecf7a827b..9f8ff0a05b8b 100644
--- a/resources/lib/moment/locale/id.js
+++ b/resources/lib/moment/locale/id.js
@@ -77,8 +77,8 @@
yy: '%d tahun',
},
week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
diff --git a/resources/lib/moment/locale/is.js b/resources/lib/moment/locale/is.js
index 480fa567ac9e..02520062d4ac 100644
--- a/resources/lib/moment/locale/is.js
+++ b/resources/lib/moment/locale/is.js
@@ -100,9 +100,10 @@
'_'
),
monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
- weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
- '_'
- ),
+ weekdays:
+ 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
+ '_'
+ ),
weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
longDateFormat: {
diff --git a/resources/lib/moment/locale/it.js b/resources/lib/moment/locale/it.js
index 4fa1efc0d49f..910e00542078 100644
--- a/resources/lib/moment/locale/it.js
+++ b/resources/lib/moment/locale/it.js
@@ -68,8 +68,8 @@
(this.hours() > 1
? 'lle '
: this.hours() === 0
- ? ' '
- : "ll'") +
+ ? ' '
+ : "ll'") +
']LT'
);
default:
@@ -78,8 +78,8 @@
(this.hours() > 1
? 'lle '
: this.hours() === 0
- ? ' '
- : "ll'") +
+ ? ' '
+ : "ll'") +
']LT'
);
}
@@ -87,9 +87,7 @@
sameElse: 'L',
},
relativeTime: {
- future: function (s) {
- return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
- },
+ future: 'tra %s',
past: '%s fa',
s: 'alcuni secondi',
ss: '%d secondi',
@@ -99,6 +97,8 @@
hh: '%d ore',
d: 'un giorno',
dd: '%d giorni',
+ w: 'una settimana',
+ ww: '%d settimane',
M: 'un mese',
MM: '%d mesi',
y: 'un anno',
diff --git a/resources/lib/moment/locale/ka.js b/resources/lib/moment/locale/ka.js
index 5bb33b0e8b24..635766940f8e 100644
--- a/resources/lib/moment/locale/ka.js
+++ b/resources/lib/moment/locale/ka.js
@@ -17,9 +17,10 @@
),
monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
weekdays: {
- standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
- '_'
- ),
+ standalone:
+ 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
+ '_'
+ ),
format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
'_'
),
@@ -45,13 +46,12 @@
},
relativeTime: {
future: function (s) {
- return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function (
- $0,
- $1,
- $2
- ) {
- return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
- });
+ return s.replace(
+ /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,
+ function ($0, $1, $2) {
+ return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
+ }
+ );
},
past: function (s) {
if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
diff --git a/resources/lib/moment/locale/km.js b/resources/lib/moment/locale/km.js
index a4457886d563..5306436e5e44 100644
--- a/resources/lib/moment/locale/km.js
+++ b/resources/lib/moment/locale/km.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '១',
- '2': '២',
- '3': '៣',
- '4': '៤',
- '5': '៥',
- '6': '៦',
- '7': '៧',
- '8': '៨',
- '9': '៩',
- '0': '០',
+ 1: '១',
+ 2: '២',
+ 3: '៣',
+ 4: '៤',
+ 5: '៥',
+ 6: '៦',
+ 7: '៧',
+ 8: '៨',
+ 9: '៩',
+ 0: '០',
},
numberMap = {
'១': '1',
@@ -40,9 +40,10 @@
months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
'_'
),
- monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
- '_'
- ),
+ monthsShort:
+ 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
+ '_'
+ ),
weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
diff --git a/resources/lib/moment/locale/kn.js b/resources/lib/moment/locale/kn.js
index 84ff9b83ea65..5fe70b0ba8a5 100644
--- a/resources/lib/moment/locale/kn.js
+++ b/resources/lib/moment/locale/kn.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '೧',
- '2': '೨',
- '3': '೩',
- '4': '೪',
- '5': '೫',
- '6': '೬',
- '7': '೭',
- '8': '೮',
- '9': '೯',
- '0': '೦',
+ 1: '೧',
+ 2: '೨',
+ 3: '೩',
+ 4: '೪',
+ 5: '೫',
+ 6: '೬',
+ 7: '೭',
+ 8: '೮',
+ 9: '೯',
+ 0: '೦',
},
numberMap = {
'೧': '1',
@@ -40,9 +40,10 @@
months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
'_'
),
- monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
- '_'
- ),
+ monthsShort:
+ 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
'_'
diff --git a/resources/lib/moment/locale/ku-kmr.js b/resources/lib/moment/locale/ku-kmr.js
new file mode 100644
index 000000000000..8ba23ed5685b
--- /dev/null
+++ b/resources/lib/moment/locale/ku-kmr.js
@@ -0,0 +1,125 @@
+//! moment.js locale configuration
+//! locale : Northern Kurdish [ku-kmr]
+//! authors : Mazlum Özdogan : https://github.com/mergehez
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function processRelativeTime(num, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['çend sanîye', 'çend sanîyeyan'],
+ ss: [num + ' sanîye', num + ' sanîyeyan'],
+ m: ['deqîqeyek', 'deqîqeyekê'],
+ mm: [num + ' deqîqe', num + ' deqîqeyan'],
+ h: ['saetek', 'saetekê'],
+ hh: [num + ' saet', num + ' saetan'],
+ d: ['rojek', 'rojekê'],
+ dd: [num + ' roj', num + ' rojan'],
+ w: ['hefteyek', 'hefteyekê'],
+ ww: [num + ' hefte', num + ' hefteyan'],
+ M: ['mehek', 'mehekê'],
+ MM: [num + ' meh', num + ' mehan'],
+ y: ['salek', 'salekê'],
+ yy: [num + ' sal', num + ' salan'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+ // function obliqueNumSuffix(num) {
+ // if(num.includes(':'))
+ // num = parseInt(num.split(':')[0]);
+ // else
+ // num = parseInt(num);
+ // return num == 0 || num % 10 == 1 ? 'ê'
+ // : (num > 10 && num % 10 == 0 ? 'î' : 'an');
+ // }
+ function ezafeNumSuffix(num) {
+ num = '' + num;
+ var l = num.substring(num.length - 1),
+ ll = num.length > 1 ? num.substring(num.length - 2) : '';
+ if (
+ !(ll == 12 || ll == 13) &&
+ (l == '2' || l == '3' || ll == '50' || l == '70' || l == '80')
+ )
+ return 'yê';
+ return 'ê';
+ }
+
+ var kuKmr = moment.defineLocale('ku-kmr', {
+ // According to the spelling rules defined by the work group of Weqfa Mezopotamyayê (Mesopotamia Foundation)
+ // this should be: 'Kanûna Paşîn_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Çirîya Pêşîn_Çirîya Paşîn_Kanûna Pêşîn'
+ // But the names below are more well known and handy
+ months: 'Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar'.split(
+ '_'
+ ),
+ monthsShort: 'Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî'.split('_'),
+ weekdaysShort: 'Yek_Du_Sê_Çar_Pên_În_Şem'.split('_'),
+ weekdaysMin: 'Ye_Du_Sê_Ça_Pê_În_Şe'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'bn' : 'BN';
+ } else {
+ return isLower ? 'pn' : 'PN';
+ }
+ },
+ meridiemParse: /bn|BN|pn|PN/,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'Do MMMM[a] YYYY[an]',
+ LLL: 'Do MMMM[a] YYYY[an] HH:mm',
+ LLLL: 'dddd, Do MMMM[a] YYYY[an] HH:mm',
+ ll: 'Do MMM[.] YYYY[an]',
+ lll: 'Do MMM[.] YYYY[an] HH:mm',
+ llll: 'ddd[.], Do MMM[.] YYYY[an] HH:mm',
+ },
+ calendar: {
+ sameDay: '[Îro di saet] LT [de]',
+ nextDay: '[Sibê di saet] LT [de]',
+ nextWeek: 'dddd [di saet] LT [de]',
+ lastDay: '[Duh di saet] LT [de]',
+ lastWeek: 'dddd[a borî di saet] LT [de]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'di %s de',
+ past: 'berî %s',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(?:yê|ê|\.)/,
+ ordinal: function (num, period) {
+ var p = period.toLowerCase();
+ if (p.includes('w') || p.includes('m')) return num + '.';
+
+ return num + ezafeNumSuffix(num);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return kuKmr;
+
+})));
diff --git a/resources/lib/moment/locale/ku.js b/resources/lib/moment/locale/ku.js
index 2c4f7e28fe8b..71c56a1140f8 100644
--- a/resources/lib/moment/locale/ku.js
+++ b/resources/lib/moment/locale/ku.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '١',
- '2': '٢',
- '3': '٣',
- '4': '٤',
- '5': '٥',
- '6': '٦',
- '7': '٧',
- '8': '٨',
- '9': '٩',
- '0': '٠',
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
},
numberMap = {
'١': '1',
@@ -53,12 +53,12 @@
var ku = moment.defineLocale('ku', {
months: months,
monthsShort: months,
- weekdays: 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(
- '_'
- ),
- weekdaysShort: 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split(
- '_'
- ),
+ weekdays:
+ 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'),
weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
diff --git a/resources/lib/moment/locale/lb.js b/resources/lib/moment/locale/lb.js
index 72a975efec7f..ffcb7584fce6 100644
--- a/resources/lib/moment/locale/lb.js
+++ b/resources/lib/moment/locale/lb.js
@@ -82,13 +82,15 @@
months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
'_'
),
- monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
- '_'
- ),
+ monthsShort:
+ 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
+ '_'
+ ),
monthsParseExact: true,
- weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
- '_'
- ),
+ weekdays:
+ 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
+ '_'
+ ),
weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
weekdaysParseExact: true,
diff --git a/resources/lib/moment/locale/lo.js b/resources/lib/moment/locale/lo.js
index 29aab3c096d7..18fc666d5c73 100644
--- a/resources/lib/moment/locale/lo.js
+++ b/resources/lib/moment/locale/lo.js
@@ -15,9 +15,10 @@
months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
'_'
),
- monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
- '_'
- ),
+ monthsShort:
+ 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
+ '_'
+ ),
weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
diff --git a/resources/lib/moment/locale/lt.js b/resources/lib/moment/locale/lt.js
index c076a13a811c..4140cf861333 100644
--- a/resources/lib/moment/locale/lt.js
+++ b/resources/lib/moment/locale/lt.js
@@ -35,8 +35,8 @@
return withoutSuffix
? forms(key)[0]
: isFuture
- ? forms(key)[1]
- : forms(key)[2];
+ ? forms(key)[1]
+ : forms(key)[2];
}
function special(number) {
return number % 10 === 0 || (number > 10 && number < 20);
@@ -65,9 +65,10 @@
format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
'_'
),
- standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
- '_'
- ),
+ standalone:
+ 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
+ '_'
+ ),
isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
},
monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
@@ -75,9 +76,10 @@
format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
'_'
),
- standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
- '_'
- ),
+ standalone:
+ 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
+ '_'
+ ),
isFormat: /dddd HH:mm/,
},
weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
diff --git a/resources/lib/moment/locale/lv.js b/resources/lib/moment/locale/lv.js
index e9a744824d0b..109fdfe3c69d 100644
--- a/resources/lib/moment/locale/lv.js
+++ b/resources/lib/moment/locale/lv.js
@@ -53,9 +53,10 @@
'_'
),
monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
- weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
- '_'
- ),
+ weekdays:
+ 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
+ '_'
+ ),
weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
weekdaysParseExact: true,
diff --git a/resources/lib/moment/locale/me.js b/resources/lib/moment/locale/me.js
index bd78eb02448f..9b2583d5b9a4 100644
--- a/resources/lib/moment/locale/me.js
+++ b/resources/lib/moment/locale/me.js
@@ -27,8 +27,8 @@
return number === 1
? wordKey[0]
: number >= 2 && number <= 4
- ? wordKey[1]
- : wordKey[2];
+ ? wordKey[1]
+ : wordKey[2];
},
translate: function (number, withoutSuffix, key) {
var wordKey = translator.words[key];
@@ -48,9 +48,8 @@
months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
'_'
),
- monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
- '_'
- ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
monthsParseExact: true,
weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
'_'
diff --git a/resources/lib/moment/locale/mi.js b/resources/lib/moment/locale/mi.js
index 747bf2591d80..f95f9cb67868 100644
--- a/resources/lib/moment/locale/mi.js
+++ b/resources/lib/moment/locale/mi.js
@@ -15,9 +15,10 @@
months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
'_'
),
- monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
- '_'
- ),
+ monthsShort:
+ 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
+ '_'
+ ),
monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
diff --git a/resources/lib/moment/locale/ml.js b/resources/lib/moment/locale/ml.js
index 552f61ff7db3..6a7298cebf22 100644
--- a/resources/lib/moment/locale/ml.js
+++ b/resources/lib/moment/locale/ml.js
@@ -15,13 +15,15 @@
months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
'_'
),
- monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
- '_'
- ),
+ monthsShort:
+ 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
+ '_'
+ ),
monthsParseExact: true,
- weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
- '_'
- ),
+ weekdays:
+ 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
+ '_'
+ ),
weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
longDateFormat: {
diff --git a/resources/lib/moment/locale/mn.js b/resources/lib/moment/locale/mn.js
index fc3d027302a6..a37b792b432c 100644
--- a/resources/lib/moment/locale/mn.js
+++ b/resources/lib/moment/locale/mn.js
@@ -41,9 +41,10 @@
months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
'_'
),
- monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
- '_'
- ),
+ monthsShort:
+ '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
diff --git a/resources/lib/moment/locale/mr.js b/resources/lib/moment/locale/mr.js
index 84f4e645425e..73d5762333b3 100644
--- a/resources/lib/moment/locale/mr.js
+++ b/resources/lib/moment/locale/mr.js
@@ -13,16 +13,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '१',
- '2': '२',
- '3': '३',
- '4': '४',
- '5': '५',
- '6': '६',
- '7': '७',
- '8': '८',
- '9': '९',
- '0': '०',
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
},
numberMap = {
'१': '1',
@@ -125,9 +125,10 @@
months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
'_'
),
- monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
- '_'
- ),
+ monthsShort:
+ 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
diff --git a/resources/lib/moment/locale/mt.js b/resources/lib/moment/locale/mt.js
index 5a61655c4e41..94b2559a27fb 100644
--- a/resources/lib/moment/locale/mt.js
+++ b/resources/lib/moment/locale/mt.js
@@ -16,9 +16,10 @@
'_'
),
monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
- weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
- '_'
- ),
+ weekdays:
+ 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
+ '_'
+ ),
weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
longDateFormat: {
diff --git a/resources/lib/moment/locale/my.js b/resources/lib/moment/locale/my.js
index 77be4fee8b9f..c1ef2dff5fa8 100644
--- a/resources/lib/moment/locale/my.js
+++ b/resources/lib/moment/locale/my.js
@@ -14,16 +14,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '၁',
- '2': '၂',
- '3': '၃',
- '4': '၄',
- '5': '၅',
- '6': '၆',
- '7': '၇',
- '8': '၈',
- '9': '၉',
- '0': '၀',
+ 1: '၁',
+ 2: '၂',
+ 3: '၃',
+ 4: '၄',
+ 5: '၅',
+ 6: '၆',
+ 7: '၇',
+ 8: '၈',
+ 9: '၉',
+ 0: '၀',
},
numberMap = {
'၁': '1',
diff --git a/resources/lib/moment/locale/nb.js b/resources/lib/moment/locale/nb.js
index 0138f095385e..1f271aae28fe 100644
--- a/resources/lib/moment/locale/nb.js
+++ b/resources/lib/moment/locale/nb.js
@@ -17,9 +17,8 @@
months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
'_'
),
- monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(
- '_'
- ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
monthsParseExact: true,
weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
@@ -48,11 +47,13 @@
ss: '%d sekunder',
m: 'ett minutt',
mm: '%d minutter',
- h: 'en time',
+ h: 'én time',
hh: '%d timer',
- d: 'en dag',
+ d: 'én dag',
dd: '%d dager',
- M: 'en måned',
+ w: 'én uke',
+ ww: '%d uker',
+ M: 'én måned',
MM: '%d måneder',
y: 'ett år',
yy: '%d år',
diff --git a/resources/lib/moment/locale/ne.js b/resources/lib/moment/locale/ne.js
index e2c737eab197..d455e004ba55 100644
--- a/resources/lib/moment/locale/ne.js
+++ b/resources/lib/moment/locale/ne.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '१',
- '2': '२',
- '3': '३',
- '4': '४',
- '5': '५',
- '6': '६',
- '7': '७',
- '8': '८',
- '9': '९',
- '0': '०',
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
},
numberMap = {
'१': '1',
@@ -40,9 +40,10 @@
months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
'_'
),
- monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
- '_'
- ),
+ monthsShort:
+ 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
'_'
diff --git a/resources/lib/moment/locale/nl-be.js b/resources/lib/moment/locale/nl-be.js
index 8d1dec9b1e1d..a35546f8cfd1 100644
--- a/resources/lib/moment/locale/nl-be.js
+++ b/resources/lib/moment/locale/nl-be.js
@@ -12,16 +12,14 @@
//! moment.js locale configuration
- var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(
- '_'
- ),
- monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(
- '_'
- ),
+ var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
monthsParse = [
/^jan/i,
/^feb/i,
- /^maart|mrt.?$/i,
+ /^(maart|mrt\.?)$/i,
/^apr/i,
/^mei$/i,
/^jun[i.]?$/i,
@@ -32,7 +30,8 @@
/^nov/i,
/^dec/i,
],
- monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+ monthsRegex =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
var nlBe = moment.defineLocale('nl-be', {
months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
@@ -50,16 +49,17 @@
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
- monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
- weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(
- '_'
- ),
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
weekdaysParseExact: true,
diff --git a/resources/lib/moment/locale/nl.js b/resources/lib/moment/locale/nl.js
index bc6dac757ff4..a285c040c845 100644
--- a/resources/lib/moment/locale/nl.js
+++ b/resources/lib/moment/locale/nl.js
@@ -12,16 +12,14 @@
//! moment.js locale configuration
- var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(
- '_'
- ),
- monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(
- '_'
- ),
+ var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
monthsParse = [
/^jan/i,
/^feb/i,
- /^maart|mrt.?$/i,
+ /^(maart|mrt\.?)$/i,
/^apr/i,
/^mei$/i,
/^jun[i.]?$/i,
@@ -32,7 +30,8 @@
/^nov/i,
/^dec/i,
],
- monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+ monthsRegex =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
var nl = moment.defineLocale('nl', {
months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
@@ -50,16 +49,17 @@
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
- monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
- weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(
- '_'
- ),
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
weekdaysParseExact: true,
@@ -90,6 +90,8 @@
hh: '%d uur',
d: 'één dag',
dd: '%d dagen',
+ w: 'één week',
+ ww: '%d weken',
M: 'één maand',
MM: '%d maanden',
y: 'één jaar',
diff --git a/resources/lib/moment/locale/nn.js b/resources/lib/moment/locale/nn.js
index 638cefb9242c..c65268ea80de 100644
--- a/resources/lib/moment/locale/nn.js
+++ b/resources/lib/moment/locale/nn.js
@@ -16,9 +16,8 @@
months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
'_'
),
- monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(
- '_'
- ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
monthsParseExact: true,
weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
@@ -51,6 +50,8 @@
hh: '%d timar',
d: 'ein dag',
dd: '%d dagar',
+ w: 'ei veke',
+ ww: '%d veker',
M: 'ein månad',
MM: '%d månader',
y: 'eit år',
diff --git a/resources/lib/moment/locale/oc-lnc.js b/resources/lib/moment/locale/oc-lnc.js
index 7301280e2d92..a6a8c911bcda 100644
--- a/resources/lib/moment/locale/oc-lnc.js
+++ b/resources/lib/moment/locale/oc-lnc.js
@@ -13,17 +13,19 @@
var ocLnc = moment.defineLocale('oc-lnc', {
months: {
- standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
- '_'
- ),
+ standalone:
+ 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
+ '_'
+ ),
format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
'_'
),
isFormat: /D[oD]?(\s)+MMMM/,
},
- monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
- '_'
- ),
+ monthsShort:
+ 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
'_'
@@ -72,12 +74,12 @@
number === 1
? 'r'
: number === 2
- ? 'n'
- : number === 3
- ? 'r'
- : number === 4
- ? 't'
- : 'è';
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
if (period === 'w' || period === 'W') {
output = 'a';
}
diff --git a/resources/lib/moment/locale/pa-in.js b/resources/lib/moment/locale/pa-in.js
index ff01b87ff032..d57eb7501b71 100644
--- a/resources/lib/moment/locale/pa-in.js
+++ b/resources/lib/moment/locale/pa-in.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '੧',
- '2': '੨',
- '3': '੩',
- '4': '੪',
- '5': '੫',
- '6': '੬',
- '7': '੭',
- '8': '੮',
- '9': '੯',
- '0': '੦',
+ 1: '੧',
+ 2: '੨',
+ 3: '੩',
+ 4: '੪',
+ 5: '੫',
+ 6: '੬',
+ 7: '੭',
+ 8: '੮',
+ 9: '੯',
+ 0: '੦',
},
numberMap = {
'੧': '1',
@@ -41,9 +41,10 @@
months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
'_'
),
- monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
- '_'
- ),
+ monthsShort:
+ 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
+ '_'
+ ),
weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
'_'
),
diff --git a/resources/lib/moment/locale/pl.js b/resources/lib/moment/locale/pl.js
index 1d2b5f29eaab..0750bb3bc1fa 100644
--- a/resources/lib/moment/locale/pl.js
+++ b/resources/lib/moment/locale/pl.js
@@ -11,12 +11,28 @@
//! moment.js locale configuration
- var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
- '_'
- ),
- monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
- '_'
- );
+ var monthsNominative =
+ 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
+ '_'
+ ),
+ monthsSubjective =
+ 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
+ '_'
+ ),
+ monthsParse = [
+ /^sty/i,
+ /^lut/i,
+ /^mar/i,
+ /^kwi/i,
+ /^maj/i,
+ /^cze/i,
+ /^lip/i,
+ /^sie/i,
+ /^wrz/i,
+ /^paź/i,
+ /^lis/i,
+ /^gru/i,
+ ];
function plural(n) {
return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
}
@@ -33,6 +49,8 @@
return withoutSuffix ? 'godzina' : 'godzinę';
case 'hh':
return result + (plural(number) ? 'godziny' : 'godzin');
+ case 'ww':
+ return result + (plural(number) ? 'tygodnie' : 'tygodni');
case 'MM':
return result + (plural(number) ? 'miesiące' : 'miesięcy');
case 'yy':
@@ -44,17 +62,6 @@
months: function (momentToFormat, format) {
if (!momentToFormat) {
return monthsNominative;
- } else if (format === '') {
- // Hack: if format empty we know this is used to generate
- // RegExp by moment. Give then back both valid forms of months
- // in RegExp ready format.
- return (
- '(' +
- monthsSubjective[momentToFormat.month()] +
- '|' +
- monthsNominative[momentToFormat.month()] +
- ')'
- );
} else if (/D MMMM/.test(format)) {
return monthsSubjective[momentToFormat.month()];
} else {
@@ -62,9 +69,11 @@
}
},
monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
- weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split(
- '_'
- ),
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays:
+ 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
longDateFormat: {
@@ -122,6 +131,8 @@
hh: translate,
d: '1 dzień',
dd: '%d dni',
+ w: 'tydzień',
+ ww: translate,
M: 'miesiąc',
MM: translate,
y: 'rok',
diff --git a/resources/lib/moment/locale/pt-br.js b/resources/lib/moment/locale/pt-br.js
index d903b7231d74..ee123bda7267 100644
--- a/resources/lib/moment/locale/pt-br.js
+++ b/resources/lib/moment/locale/pt-br.js
@@ -16,9 +16,10 @@
'_'
),
monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
- weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
- '_'
- ),
+ weekdays:
+ 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
+ '_'
+ ),
weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
weekdaysParseExact: true,
@@ -60,6 +61,7 @@
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
+ invalidDate: 'Data inválida',
});
return ptBr;
diff --git a/resources/lib/moment/locale/pt.js b/resources/lib/moment/locale/pt.js
index 6d6bd869f897..a113ed7b9b88 100644
--- a/resources/lib/moment/locale/pt.js
+++ b/resources/lib/moment/locale/pt.js
@@ -16,9 +16,10 @@
'_'
),
monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
- weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
- '_'
- ),
+ weekdays:
+ 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
+ '_'
+ ),
weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
weekdaysParseExact: true,
@@ -53,6 +54,8 @@
hh: '%d horas',
d: 'um dia',
dd: '%d dias',
+ w: 'uma semana',
+ ww: '%d semanas',
M: 'um mês',
MM: '%d meses',
y: 'um ano',
diff --git a/resources/lib/moment/locale/ro.js b/resources/lib/moment/locale/ro.js
index ae846ef465bf..c2a9dd87e2e2 100644
--- a/resources/lib/moment/locale/ro.js
+++ b/resources/lib/moment/locale/ro.js
@@ -19,6 +19,7 @@
mm: 'minute',
hh: 'ore',
dd: 'zile',
+ ww: 'săptămâni',
MM: 'luni',
yy: 'ani',
},
@@ -33,9 +34,10 @@
months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
'_'
),
- monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
- '_'
- ),
+ monthsShort:
+ 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
@@ -67,6 +69,8 @@
hh: relativeTimeWithPlural,
d: 'o zi',
dd: relativeTimeWithPlural,
+ w: 'o săptămână',
+ ww: relativeTimeWithPlural,
M: 'o lună',
MM: relativeTimeWithPlural,
y: 'un an',
diff --git a/resources/lib/moment/locale/ru.js b/resources/lib/moment/locale/ru.js
index 863223e02454..d313eae8bb07 100644
--- a/resources/lib/moment/locale/ru.js
+++ b/resources/lib/moment/locale/ru.js
@@ -1,7 +1,7 @@
//! moment.js locale configuration
//! locale : Russian [ru]
//! author : Viktorminator : https://github.com/Viktorminator
-//! Author : Menelion Elensúle : https://github.com/Oire
+//! author : Menelion Elensúle : https://github.com/Oire
//! author : Коренберг Марк : https://github.com/socketpair
;(function (global, factory) {
@@ -18,8 +18,8 @@
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];
+ ? forms[1]
+ : forms[2];
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
@@ -27,6 +27,7 @@
mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
hh: 'час_часа_часов',
dd: 'день_дня_дней',
+ ww: 'неделя_недели_недель',
MM: 'месяц_месяца_месяцев',
yy: 'год_года_лет',
};
@@ -59,27 +60,30 @@
format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
'_'
),
- standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
- '_'
- ),
+ standalone:
+ 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
+ '_'
+ ),
},
monthsShort: {
- // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
+ // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
'_'
),
- standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
- '_'
- ),
+ standalone:
+ 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
+ '_'
+ ),
},
weekdays: {
- standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
- '_'
- ),
+ standalone:
+ 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
+ '_'
+ ),
format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
'_'
),
- isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/,
+ isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
},
weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
@@ -88,16 +92,20 @@
shortMonthsParse: monthsParse,
// полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
- monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+ monthsRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
// копия предыдущего
- monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+ monthsShortRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
// полные названия с падежами
- monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
+ monthsStrictRegex:
+ /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
- // Выражение, которое соотвествует только сокращённым формам
- monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
+ // Выражение, которое соответствует только сокращённым формам
+ monthsShortStrictRegex:
+ /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
@@ -167,6 +175,8 @@
hh: relativeTimeWithPlural,
d: 'день',
dd: relativeTimeWithPlural,
+ w: 'неделя',
+ ww: relativeTimeWithPlural,
M: 'месяц',
MM: relativeTimeWithPlural,
y: 'год',
diff --git a/resources/lib/moment/locale/se.js b/resources/lib/moment/locale/se.js
index 65e2f12dfa54..289929a48b7a 100644
--- a/resources/lib/moment/locale/se.js
+++ b/resources/lib/moment/locale/se.js
@@ -15,12 +15,12 @@
months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
'_'
),
- monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split(
- '_'
- ),
- weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
- '_'
- ),
+ monthsShort:
+ 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
+ weekdays:
+ 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
+ '_'
+ ),
weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
longDateFormat: {
diff --git a/resources/lib/moment/locale/si.js b/resources/lib/moment/locale/si.js
index 8cc6ac69dc92..4421d044f326 100644
--- a/resources/lib/moment/locale/si.js
+++ b/resources/lib/moment/locale/si.js
@@ -19,9 +19,10 @@
monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
'_'
),
- weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
- '_'
- ),
+ weekdays:
+ 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
+ '_'
+ ),
weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),
weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),
weekdaysParseExact: true,
diff --git a/resources/lib/moment/locale/sk.js b/resources/lib/moment/locale/sk.js
index bd60f7bae994..99edae7717c1 100644
--- a/resources/lib/moment/locale/sk.js
+++ b/resources/lib/moment/locale/sk.js
@@ -12,9 +12,10 @@
//! moment.js locale configuration
- var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
- '_'
- ),
+ var months =
+ 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
+ '_'
+ ),
monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
function plural(n) {
return n > 1 && n < 5;
diff --git a/resources/lib/moment/locale/sl.js b/resources/lib/moment/locale/sl.js
index 73f1b17347a5..38f12109a19e 100644
--- a/resources/lib/moment/locale/sl.js
+++ b/resources/lib/moment/locale/sl.js
@@ -99,9 +99,10 @@
months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
'_'
),
- monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
- '_'
- ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
diff --git a/resources/lib/moment/locale/sr-cyrl.js b/resources/lib/moment/locale/sr-cyrl.js
index 14d47b250e72..9da10fa60d50 100644
--- a/resources/lib/moment/locale/sr-cyrl.js
+++ b/resources/lib/moment/locale/sr-cyrl.js
@@ -1,6 +1,7 @@
//! moment.js locale configuration
//! locale : Serbian Cyrillic [sr-cyrl]
//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
+//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
@@ -15,32 +16,44 @@
words: {
//Different grammatical cases
ss: ['секунда', 'секунде', 'секунди'],
- m: ['један минут', 'једне минуте'],
- mm: ['минут', 'минуте', 'минута'],
+ m: ['један минут', 'једног минута'],
+ mm: ['минут', 'минута', 'минута'],
h: ['један сат', 'једног сата'],
hh: ['сат', 'сата', 'сати'],
+ d: ['један дан', 'једног дана'],
dd: ['дан', 'дана', 'дана'],
+ M: ['један месец', 'једног месеца'],
MM: ['месец', 'месеца', 'месеци'],
- yy: ['година', 'године', 'година'],
+ y: ['једну годину', 'једне године'],
+ yy: ['годину', 'године', 'година'],
},
correctGrammaticalCase: function (number, wordKey) {
- return number === 1
- ? wordKey[0]
- : number >= 2 && number <= 4
- ? wordKey[1]
- : wordKey[2];
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
},
- translate: function (number, withoutSuffix, key) {
- var wordKey = translator.words[key];
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator.words[key],
+ word;
+
if (key.length === 1) {
- return withoutSuffix ? wordKey[0] : wordKey[1];
- } else {
- return (
- number +
- ' ' +
- translator.correctGrammaticalCase(number, wordKey)
- );
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'једна година';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'годину') {
+ return number + ' година';
}
+
+ return number + ' ' + word;
},
};
@@ -48,9 +61,8 @@
months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
'_'
),
- monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split(
- '_'
- ),
+ monthsShort:
+ 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
monthsParseExact: true,
weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
@@ -59,10 +71,10 @@
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
},
calendar: {
sameDay: '[данас у] LT',
@@ -106,18 +118,18 @@
mm: translator.translate,
h: translator.translate,
hh: translator.translate,
- d: 'дан',
+ d: translator.translate,
dd: translator.translate,
- M: 'месец',
+ M: translator.translate,
MM: translator.translate,
- y: 'годину',
+ y: translator.translate,
yy: translator.translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
},
});
diff --git a/resources/lib/moment/locale/sr.js b/resources/lib/moment/locale/sr.js
index 8cf996e6a888..8f53e7ccf60f 100644
--- a/resources/lib/moment/locale/sr.js
+++ b/resources/lib/moment/locale/sr.js
@@ -1,6 +1,7 @@
//! moment.js locale configuration
//! locale : Serbian [sr]
//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
+//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
@@ -15,32 +16,44 @@
words: {
//Different grammatical cases
ss: ['sekunda', 'sekunde', 'sekundi'],
- m: ['jedan minut', 'jedne minute'],
- mm: ['minut', 'minute', 'minuta'],
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
h: ['jedan sat', 'jednog sata'],
hh: ['sat', 'sata', 'sati'],
+ d: ['jedan dan', 'jednog dana'],
dd: ['dan', 'dana', 'dana'],
+ M: ['jedan mesec', 'jednog meseca'],
MM: ['mesec', 'meseca', 'meseci'],
- yy: ['godina', 'godine', 'godina'],
+ y: ['jednu godinu', 'jedne godine'],
+ yy: ['godinu', 'godine', 'godina'],
},
correctGrammaticalCase: function (number, wordKey) {
- return number === 1
- ? wordKey[0]
- : number >= 2 && number <= 4
- ? wordKey[1]
- : wordKey[2];
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
},
- translate: function (number, withoutSuffix, key) {
- var wordKey = translator.words[key];
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator.words[key],
+ word;
+
if (key.length === 1) {
- return withoutSuffix ? wordKey[0] : wordKey[1];
- } else {
- return (
- number +
- ' ' +
- translator.correctGrammaticalCase(number, wordKey)
- );
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'jedna godina';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'godinu') {
+ return number + ' godina';
}
+
+ return number + ' ' + word;
},
};
@@ -48,9 +61,8 @@
months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
'_'
),
- monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
- '_'
- ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
monthsParseExact: true,
weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
'_'
@@ -61,10 +73,10 @@
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
},
calendar: {
sameDay: '[danas u] LT',
@@ -108,11 +120,11 @@
mm: translator.translate,
h: translator.translate,
hh: translator.translate,
- d: 'dan',
+ d: translator.translate,
dd: translator.translate,
- M: 'mesec',
+ M: translator.translate,
MM: translator.translate,
- y: 'godinu',
+ y: translator.translate,
yy: translator.translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
diff --git a/resources/lib/moment/locale/ss.js b/resources/lib/moment/locale/ss.js
index 1bcf4effd7b6..ce8a657c19b7 100644
--- a/resources/lib/moment/locale/ss.js
+++ b/resources/lib/moment/locale/ss.js
@@ -16,9 +16,10 @@
'_'
),
monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
- weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
- '_'
- ),
+ weekdays:
+ 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
+ '_'
+ ),
weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
weekdaysParseExact: true,
diff --git a/resources/lib/moment/locale/sv.js b/resources/lib/moment/locale/sv.js
index 90fe441fcb68..5962e878d50d 100644
--- a/resources/lib/moment/locale/sv.js
+++ b/resources/lib/moment/locale/sv.js
@@ -60,12 +60,12 @@
~~((number % 100) / 10) === 1
? ':e'
: b === 1
- ? ':a'
- : b === 2
- ? ':a'
- : b === 3
- ? ':e'
- : ':e';
+ ? ':a'
+ : b === 2
+ ? ':a'
+ : b === 3
+ ? ':e'
+ : ':e';
return number + output;
},
week: {
diff --git a/resources/lib/moment/locale/sw.js b/resources/lib/moment/locale/sw.js
index 3e5839a0117f..1a5ac6438221 100644
--- a/resources/lib/moment/locale/sw.js
+++ b/resources/lib/moment/locale/sw.js
@@ -16,14 +16,15 @@
'_'
),
monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
- weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
- '_'
- ),
+ weekdays:
+ 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
+ '_'
+ ),
weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
- LT: 'HH:mm',
+ LT: 'hh:mm A',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
@@ -48,7 +49,7 @@
h: 'saa limoja',
hh: 'masaa %d',
d: 'siku moja',
- dd: 'masiku %d',
+ dd: 'siku %d',
M: 'mwezi mmoja',
MM: 'miezi %d',
y: 'mwaka mmoja',
diff --git a/resources/lib/moment/locale/ta.js b/resources/lib/moment/locale/ta.js
index 139f1ecb02a5..0f288320e6b4 100644
--- a/resources/lib/moment/locale/ta.js
+++ b/resources/lib/moment/locale/ta.js
@@ -12,16 +12,16 @@
//! moment.js locale configuration
var symbolMap = {
- '1': '௧',
- '2': '௨',
- '3': '௩',
- '4': '௪',
- '5': '௫',
- '6': '௬',
- '7': '௭',
- '8': '௮',
- '9': '௯',
- '0': '௦',
+ 1: '௧',
+ 2: '௨',
+ 3: '௩',
+ 4: '௪',
+ 5: '௫',
+ 6: '௬',
+ 7: '௭',
+ 8: '௮',
+ 9: '௯',
+ 0: '௦',
},
numberMap = {
'௧': '1',
@@ -40,12 +40,14 @@
months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
'_'
),
- monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
- '_'
- ),
- weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
- '_'
- ),
+ monthsShort:
+ 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
+ '_'
+ ),
+ weekdays:
+ 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
+ '_'
+ ),
weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
'_'
),
diff --git a/resources/lib/moment/locale/te.js b/resources/lib/moment/locale/te.js
index e1d69bd411a8..85bab7efd879 100644
--- a/resources/lib/moment/locale/te.js
+++ b/resources/lib/moment/locale/te.js
@@ -15,13 +15,15 @@
months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
'_'
),
- monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
- '_'
- ),
+ monthsShort:
+ 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
+ '_'
+ ),
monthsParseExact: true,
- weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
- '_'
- ),
+ weekdays:
+ 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
+ '_'
+ ),
weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
longDateFormat: {
diff --git a/resources/lib/moment/locale/tet.js b/resources/lib/moment/locale/tet.js
index 931384a600e5..5c62c6c9ca6d 100644
--- a/resources/lib/moment/locale/tet.js
+++ b/resources/lib/moment/locale/tet.js
@@ -60,12 +60,12 @@
~~((number % 100) / 10) === 1
? 'th'
: b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
return number + output;
},
week: {
diff --git a/resources/lib/moment/locale/tg.js b/resources/lib/moment/locale/tg.js
index a8ae777566ed..bde72ad13683 100644
--- a/resources/lib/moment/locale/tg.js
+++ b/resources/lib/moment/locale/tg.js
@@ -37,9 +37,15 @@
};
var tg = moment.defineLocale('tg', {
- months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
- '_'
- ),
+ months: {
+ format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
+ '_'
+ ),
+ standalone:
+ 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
+ '_'
+ ),
+ },
monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
'_'
@@ -49,14 +55,14 @@
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
+ L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Имрӯз соати] LT',
- nextDay: '[Пагоҳ соати] LT',
+ nextDay: '[Фардо соати] LT',
lastDay: '[Дирӯз соати] LT',
nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
diff --git a/resources/lib/moment/locale/th.js b/resources/lib/moment/locale/th.js
index 4e82f1b1d682..f83bad95e668 100644
--- a/resources/lib/moment/locale/th.js
+++ b/resources/lib/moment/locale/th.js
@@ -15,9 +15,10 @@
months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
'_'
),
- monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
- '_'
- ),
+ monthsShort:
+ 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
@@ -61,6 +62,8 @@
hh: '%d ชั่วโมง',
d: '1 วัน',
dd: '%d วัน',
+ w: '1 สัปดาห์',
+ ww: '%d สัปดาห์',
M: '1 เดือน',
MM: '%d เดือน',
y: '1 ปี',
diff --git a/resources/lib/moment/locale/tk.js b/resources/lib/moment/locale/tk.js
new file mode 100644
index 000000000000..24d4ede9084c
--- /dev/null
+++ b/resources/lib/moment/locale/tk.js
@@ -0,0 +1,102 @@
+//! moment.js locale configuration
+//! locale : Turkmen [tk]
+//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var suffixes = {
+ 1: "'inji",
+ 5: "'inji",
+ 8: "'inji",
+ 70: "'inji",
+ 80: "'inji",
+ 2: "'nji",
+ 7: "'nji",
+ 20: "'nji",
+ 50: "'nji",
+ 3: "'ünji",
+ 4: "'ünji",
+ 100: "'ünji",
+ 6: "'njy",
+ 9: "'unjy",
+ 10: "'unjy",
+ 30: "'unjy",
+ 60: "'ynjy",
+ 90: "'ynjy",
+ };
+
+ var tk = moment.defineLocale('tk', {
+ months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
+ weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
+ '_'
+ ),
+ weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
+ weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün sagat] LT',
+ nextDay: '[ertir sagat] LT',
+ nextWeek: '[indiki] dddd [sagat] LT',
+ lastDay: '[düýn] LT',
+ lastWeek: '[geçen] dddd [sagat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s soň',
+ past: '%s öň',
+ s: 'birnäçe sekunt',
+ m: 'bir minut',
+ mm: '%d minut',
+ h: 'bir sagat',
+ hh: '%d sagat',
+ d: 'bir gün',
+ dd: '%d gün',
+ M: 'bir aý',
+ MM: '%d aý',
+ y: 'bir ýyl',
+ yy: '%d ýyl',
+ },
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'Do':
+ case 'DD':
+ return number;
+ default:
+ if (number === 0) {
+ // special case for zero
+ return number + "'unjy";
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return tk;
+
+})));
diff --git a/resources/lib/moment/locale/tlh.js b/resources/lib/moment/locale/tlh.js
index 22c1fc30d2ba..ed61731a5c10 100644
--- a/resources/lib/moment/locale/tlh.js
+++ b/resources/lib/moment/locale/tlh.js
@@ -19,10 +19,10 @@
output.indexOf('jaj') !== -1
? time.slice(0, -3) + 'leS'
: output.indexOf('jar') !== -1
- ? time.slice(0, -3) + 'waQ'
- : output.indexOf('DIS') !== -1
- ? time.slice(0, -3) + 'nem'
- : time + ' pIq';
+ ? time.slice(0, -3) + 'waQ'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'nem'
+ : time + ' pIq';
return time;
}
@@ -32,10 +32,10 @@
output.indexOf('jaj') !== -1
? time.slice(0, -3) + 'Hu’'
: output.indexOf('jar') !== -1
- ? time.slice(0, -3) + 'wen'
- : output.indexOf('DIS') !== -1
- ? time.slice(0, -3) + 'ben'
- : time + ' ret';
+ ? time.slice(0, -3) + 'wen'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'ben'
+ : time + ' ret';
return time;
}
@@ -78,19 +78,18 @@
months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
'_'
),
- monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
- '_'
- ),
+ monthsShort:
+ 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
'_'
),
- weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
- '_'
- ),
- weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
- '_'
- ),
+ weekdaysShort:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+ weekdaysMin:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
diff --git a/resources/lib/moment/locale/tr.js b/resources/lib/moment/locale/tr.js
index 93c278823d90..663778e99450 100644
--- a/resources/lib/moment/locale/tr.js
+++ b/resources/lib/moment/locale/tr.js
@@ -41,8 +41,19 @@
weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
'_'
),
- weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
+ weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),
weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'öö' : 'ÖÖ';
+ } else {
+ return isLower ? 'ös' : 'ÖS';
+ }
+ },
+ meridiemParse: /öö|ÖÖ|ös|ÖS/,
+ isPM: function (input) {
+ return input === 'ös' || input === 'ÖS';
+ },
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
@@ -70,6 +81,8 @@
hh: '%d saat',
d: 'bir gün',
dd: '%d gün',
+ w: 'bir hafta',
+ ww: '%d hafta',
M: 'bir ay',
MM: '%d ay',
y: 'bir yıl',
diff --git a/resources/lib/moment/locale/tzl.js b/resources/lib/moment/locale/tzl.js
index 5eb1c067ee6e..43ad139ebf09 100644
--- a/resources/lib/moment/locale/tzl.js
+++ b/resources/lib/moment/locale/tzl.js
@@ -91,8 +91,8 @@
return isFuture
? format[key][0]
: withoutSuffix
- ? format[key][0]
- : format[key][1];
+ ? format[key][0]
+ : format[key][1];
}
return tzl;
diff --git a/resources/lib/moment/locale/tzm-latn.js b/resources/lib/moment/locale/tzm-latn.js
index d362c28aeda7..34425a7e4d64 100644
--- a/resources/lib/moment/locale/tzm-latn.js
+++ b/resources/lib/moment/locale/tzm-latn.js
@@ -15,9 +15,10 @@
months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
'_'
),
- monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
- '_'
- ),
+ monthsShort:
+ 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
+ '_'
+ ),
weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
diff --git a/resources/lib/moment/locale/tzm.js b/resources/lib/moment/locale/tzm.js
index 0427f4c221fd..5db61f946d43 100644
--- a/resources/lib/moment/locale/tzm.js
+++ b/resources/lib/moment/locale/tzm.js
@@ -15,9 +15,10 @@
months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
'_'
),
- monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
- '_'
- ),
+ monthsShort:
+ 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
+ '_'
+ ),
weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
diff --git a/resources/lib/moment/locale/ug-cn.js b/resources/lib/moment/locale/ug-cn.js
index 09cea4066933..5efffdd4575d 100644
--- a/resources/lib/moment/locale/ug-cn.js
+++ b/resources/lib/moment/locale/ug-cn.js
@@ -1,4 +1,4 @@
-//! moment.js language configuration
+//! moment.js locale configuration
//! locale : Uyghur (China) [ug-cn]
//! author: boyaq : https://github.com/boyaq
@@ -9,15 +9,16 @@
factory(global.moment)
}(this, (function (moment) { 'use strict';
- //! moment.js language configuration
+ //! moment.js locale configuration
var ugCn = moment.defineLocale('ug-cn', {
months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
'_'
),
- monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
- '_'
- ),
+ monthsShort:
+ 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
+ '_'
+ ),
weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
'_'
),
diff --git a/resources/lib/moment/locale/uk.js b/resources/lib/moment/locale/uk.js
index d2a80e51ea4a..f5fd3528dfc1 100644
--- a/resources/lib/moment/locale/uk.js
+++ b/resources/lib/moment/locale/uk.js
@@ -17,8 +17,8 @@
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];
+ ? forms[1]
+ : forms[2];
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
@@ -39,15 +39,18 @@
}
function weekdaysCaseReplace(m, format) {
var weekdays = {
- nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
- '_'
- ),
- accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
- '_'
- ),
- genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
- '_'
- ),
+ nominative:
+ 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
+ '_'
+ ),
+ accusative:
+ 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
+ '_'
+ ),
+ genitive:
+ 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
+ '_'
+ ),
},
nounCase;
@@ -63,8 +66,8 @@
nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
? 'accusative'
: /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
- ? 'genitive'
- : 'nominative';
+ ? 'genitive'
+ : 'nominative';
return weekdays[nounCase][m.day()];
}
function processHoursFunction(str) {
@@ -78,9 +81,10 @@
format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
'_'
),
- standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
- '_'
- ),
+ standalone:
+ 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
+ '_'
+ ),
},
monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
'_'
diff --git a/resources/lib/moment/locale/uz-latn.js b/resources/lib/moment/locale/uz-latn.js
index 93403ec63da4..af08e60f0160 100644
--- a/resources/lib/moment/locale/uz-latn.js
+++ b/resources/lib/moment/locale/uz-latn.js
@@ -16,9 +16,10 @@
'_'
),
monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
- weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
- '_'
- ),
+ weekdays:
+ 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
+ '_'
+ ),
weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
longDateFormat: {
diff --git a/resources/lib/moment/locale/vi.js b/resources/lib/moment/locale/vi.js
index 0587d4ab6d96..fb6b4b40bb81 100644
--- a/resources/lib/moment/locale/vi.js
+++ b/resources/lib/moment/locale/vi.js
@@ -16,9 +16,10 @@
months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
'_'
),
- monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split(
- '_'
- ),
+ monthsShort:
+ 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(
+ '_'
+ ),
monthsParseExact: true,
weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
'_'
@@ -68,6 +69,8 @@
hh: '%d giờ',
d: 'một ngày',
dd: '%d ngày',
+ w: 'một tuần',
+ ww: '%d tuần',
M: 'một tháng',
MM: '%d tháng',
y: 'một năm',
diff --git a/resources/lib/moment/locale/x-pseudo.js b/resources/lib/moment/locale/x-pseudo.js
index e688a940dd5c..a46e1d7d4047 100644
--- a/resources/lib/moment/locale/x-pseudo.js
+++ b/resources/lib/moment/locale/x-pseudo.js
@@ -15,13 +15,15 @@
months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
'_'
),
- monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
- '_'
- ),
+ monthsShort:
+ 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
+ '_'
+ ),
monthsParseExact: true,
- weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
- '_'
- ),
+ weekdays:
+ 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
+ '_'
+ ),
weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
weekdaysParseExact: true,
@@ -63,12 +65,12 @@
~~((number % 100) / 10) === 1
? 'th'
: b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
return number + output;
},
week: {
diff --git a/resources/lib/moment/locale/zh-cn.js b/resources/lib/moment/locale/zh-cn.js
index a11589869da3..c14ca47cac9e 100644
--- a/resources/lib/moment/locale/zh-cn.js
+++ b/resources/lib/moment/locale/zh-cn.js
@@ -2,6 +2,7 @@
//! locale : Chinese (China) [zh-cn]
//! author : suupic : https://github.com/suupic
//! author : Zeno Zeng : https://github.com/zenozeng
+//! author : uu109 : https://github.com/uu109
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
@@ -67,9 +68,21 @@
calendar: {
sameDay: '[今天]LT',
nextDay: '[明天]LT',
- nextWeek: '[下]ddddLT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ return '[下]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
lastDay: '[昨天]LT',
- lastWeek: '[上]ddddLT',
+ lastWeek: function (now) {
+ if (this.week() !== now.week()) {
+ return '[上]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
sameElse: 'L',
},
dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
@@ -99,6 +112,8 @@
hh: '%d 小时',
d: '1 天',
dd: '%d 天',
+ w: '1 周',
+ ww: '%d 周',
M: '1 个月',
MM: '%d 个月',
y: '1 年',
diff --git a/resources/lib/moment/moment.js b/resources/lib/moment/moment.js
index 0c0071d5c72b..480b9fb3db59 100644
--- a/resources/lib/moment/moment.js
+++ b/resources/lib/moment/moment.js
@@ -1,5 +1,5 @@
//! moment.js
-//! version : 2.25.2
+//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
@@ -76,8 +76,9 @@
function map(arr, fn) {
var res = [],
- i;
- for (i = 0; i < arr.length; ++i) {
+ i,
+ arrLen = arr.length;
+ for (i = 0; i < arrLen; ++i) {
res.push(fn(arr[i], i));
}
return res;
@@ -154,24 +155,25 @@
}
function isValid(m) {
- if (m._isValid == null) {
- var flags = getParsingFlags(m),
- parsedParts = some.call(flags.parsedDateParts, function (i) {
- return i != null;
- }),
- isNowValid =
- !isNaN(m._d.getTime()) &&
- flags.overflow < 0 &&
- !flags.empty &&
- !flags.invalidEra &&
- !flags.invalidMonth &&
- !flags.invalidWeekday &&
- !flags.weekdayMismatch &&
- !flags.nullInput &&
- !flags.invalidFormat &&
- !flags.userInvalidated &&
- (!flags.meridiem || (flags.meridiem && parsedParts));
-
+ var flags = null,
+ parsedParts = false,
+ isNowValid = m._d && !isNaN(m._d.getTime());
+ if (isNowValid) {
+ flags = getParsingFlags(m);
+ parsedParts = some.call(flags.parsedDateParts, function (i) {
+ return i != null;
+ });
+ isNowValid =
+ flags.overflow < 0 &&
+ !flags.empty &&
+ !flags.invalidEra &&
+ !flags.invalidMonth &&
+ !flags.invalidWeekday &&
+ !flags.weekdayMismatch &&
+ !flags.nullInput &&
+ !flags.invalidFormat &&
+ !flags.userInvalidated &&
+ (!flags.meridiem || (flags.meridiem && parsedParts));
if (m._strict) {
isNowValid =
isNowValid &&
@@ -179,12 +181,11 @@
flags.unusedTokens.length === 0 &&
flags.bigHour === undefined;
}
-
- if (Object.isFrozen == null || !Object.isFrozen(m)) {
- m._isValid = isNowValid;
- } else {
- return isNowValid;
- }
+ }
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
+ m._isValid = isNowValid;
+ } else {
+ return isNowValid;
}
return m._isValid;
}
@@ -206,7 +207,10 @@
updateInProgress = false;
function copyConfig(to, from) {
- var i, prop, val;
+ var i,
+ prop,
+ val,
+ momentPropertiesLen = momentProperties.length;
if (!isUndefined(from._isAMomentObject)) {
to._isAMomentObject = from._isAMomentObject;
@@ -239,8 +243,8 @@
to._locale = from._locale;
}
- if (momentProperties.length > 0) {
- for (i = 0; i < momentProperties.length; i++) {
+ if (momentPropertiesLen > 0) {
+ for (i = 0; i < momentPropertiesLen; i++) {
prop = momentProperties[i];
val = from[prop];
if (!isUndefined(val)) {
@@ -295,8 +299,9 @@
var args = [],
arg,
i,
- key;
- for (i = 0; i < arguments.length; i++) {
+ key,
+ argLen = arguments.length;
+ for (i = 0; i < argLen; i++) {
arg = '';
if (typeof arguments[i] === 'object') {
arg += '\n[' + i + '] ';
@@ -446,7 +451,8 @@
);
}
- var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
+ var formattingTokens =
+ /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
formatFunctions = {},
formatTokenFunctions = {};
@@ -624,12 +630,56 @@
return isFunction(format) ? format(output) : format.replace(/%s/i, output);
}
- var aliases = {};
-
- function addUnitAlias(unit, shorthand) {
- var lowerCase = unit.toLowerCase();
- aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
- }
+ var aliases = {
+ D: 'date',
+ dates: 'date',
+ date: 'date',
+ d: 'day',
+ days: 'day',
+ day: 'day',
+ e: 'weekday',
+ weekdays: 'weekday',
+ weekday: 'weekday',
+ E: 'isoWeekday',
+ isoweekdays: 'isoWeekday',
+ isoweekday: 'isoWeekday',
+ DDD: 'dayOfYear',
+ dayofyears: 'dayOfYear',
+ dayofyear: 'dayOfYear',
+ h: 'hour',
+ hours: 'hour',
+ hour: 'hour',
+ ms: 'millisecond',
+ milliseconds: 'millisecond',
+ millisecond: 'millisecond',
+ m: 'minute',
+ minutes: 'minute',
+ minute: 'minute',
+ M: 'month',
+ months: 'month',
+ month: 'month',
+ Q: 'quarter',
+ quarters: 'quarter',
+ quarter: 'quarter',
+ s: 'second',
+ seconds: 'second',
+ second: 'second',
+ gg: 'weekYear',
+ weekyears: 'weekYear',
+ weekyear: 'weekYear',
+ GG: 'isoWeekYear',
+ isoweekyears: 'isoWeekYear',
+ isoweekyear: 'isoWeekYear',
+ w: 'week',
+ weeks: 'week',
+ week: 'week',
+ W: 'isoWeek',
+ isoweeks: 'isoWeek',
+ isoweek: 'isoWeek',
+ y: 'year',
+ years: 'year',
+ year: 'year',
+ };
function normalizeUnits(units) {
return typeof units === 'string'
@@ -654,11 +704,24 @@
return normalizedInput;
}
- var priorities = {};
-
- function addUnitPriority(unit, priority) {
- priorities[unit] = priority;
- }
+ var priorities = {
+ date: 9,
+ day: 11,
+ weekday: 11,
+ isoWeekday: 11,
+ dayOfYear: 4,
+ hour: 13,
+ millisecond: 16,
+ minute: 14,
+ month: 8,
+ quarter: 7,
+ second: 15,
+ weekYear: 1,
+ isoWeekYear: 1,
+ week: 5,
+ isoWeek: 5,
+ year: 1,
+ };
function getPrioritizedUnits(unitsObj) {
var units = [],
@@ -674,95 +737,6 @@
return units;
}
- function isLeapYear(year) {
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
- }
-
- function absFloor(number) {
- if (number < 0) {
- // -0 -> 0
- return Math.ceil(number) || 0;
- } else {
- return Math.floor(number);
- }
- }
-
- function toInt(argumentForCoercion) {
- var coercedNumber = +argumentForCoercion,
- value = 0;
-
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
- value = absFloor(coercedNumber);
- }
-
- return value;
- }
-
- function makeGetSet(unit, keepTime) {
- return function (value) {
- if (value != null) {
- set$1(this, unit, value);
- hooks.updateOffset(this, keepTime);
- return this;
- } else {
- return get(this, unit);
- }
- };
- }
-
- function get(mom, unit) {
- return mom.isValid()
- ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
- : NaN;
- }
-
- function set$1(mom, unit, value) {
- if (mom.isValid() && !isNaN(value)) {
- if (
- unit === 'FullYear' &&
- isLeapYear(mom.year()) &&
- mom.month() === 1 &&
- mom.date() === 29
- ) {
- value = toInt(value);
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
- value,
- mom.month(),
- daysInMonth(value, mom.month())
- );
- } else {
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
- }
- }
- }
-
- // MOMENTS
-
- function stringGet(units) {
- units = normalizeUnits(units);
- if (isFunction(this[units])) {
- return this[units]();
- }
- return this;
- }
-
- function stringSet(units, value) {
- if (typeof units === 'object') {
- units = normalizeObjectUnits(units);
- var prioritized = getPrioritizedUnits(units),
- i;
- for (i = 0; i < prioritized.length; i++) {
- this[prioritized[i].unit](units[prioritized[i].unit]);
- }
- } else {
- units = normalizeUnits(units);
- if (isFunction(this[units])) {
- return this[units](value);
- }
- }
- return this;
- }
-
var match1 = /\d/, // 0 - 9
match2 = /\d\d/, // 00 - 99
match3 = /\d{3}/, // 000 - 999
@@ -781,7 +755,10 @@
matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
// any word (or two) characters or numbers including two/three word month in arabic.
// includes scottish gaelic two word and hyphenated months
- matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
+ matchWord =
+ /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
+ match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99
+ match1to2HasZero = /^([1-9]\d|\d)/, // 0-99
regexes;
regexes = {};
@@ -807,15 +784,12 @@
return regexEscape(
s
.replace('\\', '')
- .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (
- matched,
- p1,
- p2,
- p3,
- p4
- ) {
- return p1 || p2 || p3 || p4;
- })
+ .replace(
+ /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
+ function (matched, p1, p2, p3, p4) {
+ return p1 || p2 || p3 || p4;
+ }
+ )
);
}
@@ -823,11 +797,32 @@
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
}
+ function absFloor(number) {
+ if (number < 0) {
+ // -0 -> 0
+ return Math.ceil(number) || 0;
+ } else {
+ return Math.floor(number);
+ }
+ }
+
+ function toInt(argumentForCoercion) {
+ var coercedNumber = +argumentForCoercion,
+ value = 0;
+
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
+ value = absFloor(coercedNumber);
+ }
+
+ return value;
+ }
+
var tokens = {};
function addParseToken(token, callback) {
var i,
- func = callback;
+ func = callback,
+ tokenLen;
if (typeof token === 'string') {
token = [token];
}
@@ -836,7 +831,8 @@
array[callback] = toInt(input);
};
}
- for (i = 0; i < token.length; i++) {
+ tokenLen = token.length;
+ for (i = 0; i < tokenLen; i++) {
tokens[token[i]] = func;
}
}
@@ -854,6 +850,10 @@
}
}
+ function isLeapYear(year) {
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
+ }
+
var YEAR = 0,
MONTH = 1,
DATE = 2,
@@ -864,6 +864,173 @@
WEEK = 7,
WEEKDAY = 8;
+ // FORMATTING
+
+ addFormatToken('Y', 0, 0, function () {
+ var y = this.year();
+ return y <= 9999 ? zeroFill(y, 4) : '+' + y;
+ });
+
+ addFormatToken(0, ['YY', 2], 0, function () {
+ return this.year() % 100;
+ });
+
+ addFormatToken(0, ['YYYY', 4], 0, 'year');
+ addFormatToken(0, ['YYYYY', 5], 0, 'year');
+ addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
+
+ // PARSING
+
+ addRegexToken('Y', matchSigned);
+ addRegexToken('YY', match1to2, match2);
+ addRegexToken('YYYY', match1to4, match4);
+ addRegexToken('YYYYY', match1to6, match6);
+ addRegexToken('YYYYYY', match1to6, match6);
+
+ addParseToken(['YYYYY', 'YYYYYY'], YEAR);
+ addParseToken('YYYY', function (input, array) {
+ array[YEAR] =
+ input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
+ });
+ addParseToken('YY', function (input, array) {
+ array[YEAR] = hooks.parseTwoDigitYear(input);
+ });
+ addParseToken('Y', function (input, array) {
+ array[YEAR] = parseInt(input, 10);
+ });
+
+ // HELPERS
+
+ function daysInYear(year) {
+ return isLeapYear(year) ? 366 : 365;
+ }
+
+ // HOOKS
+
+ hooks.parseTwoDigitYear = function (input) {
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
+ };
+
+ // MOMENTS
+
+ var getSetYear = makeGetSet('FullYear', true);
+
+ function getIsLeapYear() {
+ return isLeapYear(this.year());
+ }
+
+ function makeGetSet(unit, keepTime) {
+ return function (value) {
+ if (value != null) {
+ set$1(this, unit, value);
+ hooks.updateOffset(this, keepTime);
+ return this;
+ } else {
+ return get(this, unit);
+ }
+ };
+ }
+
+ function get(mom, unit) {
+ if (!mom.isValid()) {
+ return NaN;
+ }
+
+ var d = mom._d,
+ isUTC = mom._isUTC;
+
+ switch (unit) {
+ case 'Milliseconds':
+ return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
+ case 'Seconds':
+ return isUTC ? d.getUTCSeconds() : d.getSeconds();
+ case 'Minutes':
+ return isUTC ? d.getUTCMinutes() : d.getMinutes();
+ case 'Hours':
+ return isUTC ? d.getUTCHours() : d.getHours();
+ case 'Date':
+ return isUTC ? d.getUTCDate() : d.getDate();
+ case 'Day':
+ return isUTC ? d.getUTCDay() : d.getDay();
+ case 'Month':
+ return isUTC ? d.getUTCMonth() : d.getMonth();
+ case 'FullYear':
+ return isUTC ? d.getUTCFullYear() : d.getFullYear();
+ default:
+ return NaN; // Just in case
+ }
+ }
+
+ function set$1(mom, unit, value) {
+ var d, isUTC, year, month, date;
+
+ if (!mom.isValid() || isNaN(value)) {
+ return;
+ }
+
+ d = mom._d;
+ isUTC = mom._isUTC;
+
+ switch (unit) {
+ case 'Milliseconds':
+ return void (isUTC
+ ? d.setUTCMilliseconds(value)
+ : d.setMilliseconds(value));
+ case 'Seconds':
+ return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));
+ case 'Minutes':
+ return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));
+ case 'Hours':
+ return void (isUTC ? d.setUTCHours(value) : d.setHours(value));
+ case 'Date':
+ return void (isUTC ? d.setUTCDate(value) : d.setDate(value));
+ // case 'Day': // Not real
+ // return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
+ // case 'Month': // Not used because we need to pass two variables
+ // return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
+ case 'FullYear':
+ break; // See below ...
+ default:
+ return; // Just in case
+ }
+
+ year = value;
+ month = mom.month();
+ date = mom.date();
+ date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;
+ void (isUTC
+ ? d.setUTCFullYear(year, month, date)
+ : d.setFullYear(year, month, date));
+ }
+
+ // MOMENTS
+
+ function stringGet(units) {
+ units = normalizeUnits(units);
+ if (isFunction(this[units])) {
+ return this[units]();
+ }
+ return this;
+ }
+
+ function stringSet(units, value) {
+ if (typeof units === 'object') {
+ units = normalizeObjectUnits(units);
+ var prioritized = getPrioritizedUnits(units),
+ i,
+ prioritizedLen = prioritized.length;
+ for (i = 0; i < prioritizedLen; i++) {
+ this[prioritized[i].unit](units[prioritized[i].unit]);
+ }
+ } else {
+ units = normalizeUnits(units);
+ if (isFunction(this[units])) {
+ return this[units](value);
+ }
+ }
+ return this;
+ }
+
function mod(n, x) {
return ((n % x) + x) % x;
}
@@ -912,17 +1079,9 @@
return this.localeData().months(this, format);
});
- // ALIASES
-
- addUnitAlias('month', 'M');
-
- // PRIORITY
-
- addUnitPriority('month', 8);
-
// PARSING
- addRegexToken('M', match1to2);
+ addRegexToken('M', match1to2, match1to2NoLeadingZero);
addRegexToken('MM', match1to2, match2);
addRegexToken('MMM', function (isStrict, locale) {
return locale.monthsShortRegex(isStrict);
@@ -947,12 +1106,12 @@
// LOCALES
- var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'
- ),
- defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split(
- '_'
- ),
+ var defaultLocaleMonths =
+ 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ defaultLocaleMonthsShort =
+ 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
defaultMonthsShortRegex = matchWord,
defaultMonthsRegex = matchWord;
@@ -1088,8 +1247,6 @@
// MOMENTS
function setMonth(mom, value) {
- var dayOfMonth;
-
if (!mom.isValid()) {
// No op
return mom;
@@ -1107,8 +1264,13 @@
}
}
- dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
+ var month = value,
+ date = mom.date();
+
+ date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
+ void (mom._isUTC
+ ? mom._d.setUTCMonth(month, date)
+ : mom._d.setMonth(month, date));
return mom;
}
@@ -1175,27 +1337,24 @@
longPieces = [],
mixedPieces = [],
i,
- mom;
+ mom,
+ shortP,
+ longP;
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, i]);
- shortPieces.push(this.monthsShort(mom, ''));
- longPieces.push(this.months(mom, ''));
- mixedPieces.push(this.months(mom, ''));
- mixedPieces.push(this.monthsShort(mom, ''));
+ shortP = regexEscape(this.monthsShort(mom, ''));
+ longP = regexEscape(this.months(mom, ''));
+ shortPieces.push(shortP);
+ longPieces.push(longP);
+ mixedPieces.push(longP);
+ mixedPieces.push(shortP);
}
// Sorting makes sure if one month (or abbr) is a prefix of another it
// will match the longer piece.
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
- for (i = 0; i < 12; i++) {
- shortPieces[i] = regexEscape(shortPieces[i]);
- longPieces[i] = regexEscape(longPieces[i]);
- }
- for (i = 0; i < 24; i++) {
- mixedPieces[i] = regexEscape(mixedPieces[i]);
- }
this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._monthsShortRegex = this._monthsRegex;
@@ -1209,69 +1368,6 @@
);
}
- // FORMATTING
-
- addFormatToken('Y', 0, 0, function () {
- var y = this.year();
- return y <= 9999 ? zeroFill(y, 4) : '+' + y;
- });
-
- addFormatToken(0, ['YY', 2], 0, function () {
- return this.year() % 100;
- });
-
- addFormatToken(0, ['YYYY', 4], 0, 'year');
- addFormatToken(0, ['YYYYY', 5], 0, 'year');
- addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
-
- // ALIASES
-
- addUnitAlias('year', 'y');
-
- // PRIORITIES
-
- addUnitPriority('year', 1);
-
- // PARSING
-
- addRegexToken('Y', matchSigned);
- addRegexToken('YY', match1to2, match2);
- addRegexToken('YYYY', match1to4, match4);
- addRegexToken('YYYYY', match1to6, match6);
- addRegexToken('YYYYYY', match1to6, match6);
-
- addParseToken(['YYYYY', 'YYYYYY'], YEAR);
- addParseToken('YYYY', function (input, array) {
- array[YEAR] =
- input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
- });
- addParseToken('YY', function (input, array) {
- array[YEAR] = hooks.parseTwoDigitYear(input);
- });
- addParseToken('Y', function (input, array) {
- array[YEAR] = parseInt(input, 10);
- });
-
- // HELPERS
-
- function daysInYear(year) {
- return isLeapYear(year) ? 366 : 365;
- }
-
- // HOOKS
-
- hooks.parseTwoDigitYear = function (input) {
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
- };
-
- // MOMENTS
-
- var getSetYear = makeGetSet('FullYear', true);
-
- function getIsLeapYear() {
- return isLeapYear(this.year());
- }
-
function createDate(y, m, d, h, M, s, ms) {
// can't just apply() to create a date:
// https://stackoverflow.com/q/181348
@@ -1377,31 +1473,19 @@
addFormatToken('w', ['ww', 2], 'wo', 'week');
addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
- // ALIASES
-
- addUnitAlias('week', 'w');
- addUnitAlias('isoWeek', 'W');
-
- // PRIORITIES
-
- addUnitPriority('week', 5);
- addUnitPriority('isoWeek', 5);
-
// PARSING
- addRegexToken('w', match1to2);
+ addRegexToken('w', match1to2, match1to2NoLeadingZero);
addRegexToken('ww', match1to2, match2);
- addRegexToken('W', match1to2);
+ addRegexToken('W', match1to2, match1to2NoLeadingZero);
addRegexToken('WW', match1to2, match2);
- addWeekParseToken(['w', 'ww', 'W', 'WW'], function (
- input,
- week,
- config,
- token
- ) {
- week[token.substr(0, 1)] = toInt(input);
- });
+ addWeekParseToken(
+ ['w', 'ww', 'W', 'WW'],
+ function (input, week, config, token) {
+ week[token.substr(0, 1)] = toInt(input);
+ }
+ );
// HELPERS
@@ -1455,17 +1539,6 @@
addFormatToken('e', 0, 0, 'weekday');
addFormatToken('E', 0, 0, 'isoWeekday');
- // ALIASES
-
- addUnitAlias('day', 'd');
- addUnitAlias('weekday', 'e');
- addUnitAlias('isoWeekday', 'E');
-
- // PRIORITY
- addUnitPriority('day', 11);
- addUnitPriority('weekday', 11);
- addUnitPriority('isoWeekday', 11);
-
// PARSING
addRegexToken('d', match1to2);
@@ -1526,9 +1599,8 @@
return ws.slice(n, 7).concat(ws.slice(0, n));
}
- var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'
- ),
+ var defaultLocaleWeekdays =
+ 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
defaultWeekdaysRegex = matchWord,
@@ -1546,24 +1618,24 @@
return m === true
? shiftWeekdays(weekdays, this._week.dow)
: m
- ? weekdays[m.day()]
- : weekdays;
+ ? weekdays[m.day()]
+ : weekdays;
}
function localeWeekdaysShort(m) {
return m === true
? shiftWeekdays(this._weekdaysShort, this._week.dow)
: m
- ? this._weekdaysShort[m.day()]
- : this._weekdaysShort;
+ ? this._weekdaysShort[m.day()]
+ : this._weekdaysShort;
}
function localeWeekdaysMin(m) {
return m === true
? shiftWeekdays(this._weekdaysMin, this._week.dow)
: m
- ? this._weekdaysMin[m.day()]
- : this._weekdaysMin;
+ ? this._weekdaysMin[m.day()]
+ : this._weekdaysMin;
}
function handleStrictParse$1(weekdayName, format, strict) {
@@ -1712,7 +1784,8 @@
if (!this.isValid()) {
return input != null ? this : NaN;
}
- var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
+
+ var day = get(this, 'Day');
if (input != null) {
input = parseWeekday(input, this.localeData());
return this.add(input - day, 'd');
@@ -1911,13 +1984,6 @@
meridiem('a', true);
meridiem('A', false);
- // ALIASES
-
- addUnitAlias('hour', 'h');
-
- // PRIORITY
- addUnitPriority('hour', 13);
-
// PARSING
function matchMeridiem(isStrict, locale) {
@@ -1926,9 +1992,9 @@
addRegexToken('a', matchMeridiem);
addRegexToken('A', matchMeridiem);
- addRegexToken('H', match1to2);
- addRegexToken('h', match1to2);
- addRegexToken('k', match1to2);
+ addRegexToken('H', match1to2, match1to2HasZero);
+ addRegexToken('h', match1to2, match1to2NoLeadingZero);
+ addRegexToken('k', match1to2, match1to2NoLeadingZero);
addRegexToken('HH', match1to2, match2);
addRegexToken('hh', match1to2, match2);
addRegexToken('kk', match1to2, match2);
@@ -2076,6 +2142,12 @@
return globalLocale;
}
+ function isLocaleNameSane(name) {
+ // Prevent names that look like filesystem paths, i.e contain '/' or '\'
+ // Ensure name is available and function returns boolean
+ return !!(name && name.match('^[^/\\\\]*$'));
+ }
+
function loadLocale(name) {
var oldLocale = null,
aliasedRequire;
@@ -2084,7 +2156,8 @@
locales[name] === undefined &&
typeof module !== 'undefined' &&
module &&
- module.exports
+ module.exports &&
+ isLocaleNameSane(name)
) {
try {
oldLocale = globalLocale._abbr;
@@ -2264,21 +2337,21 @@
a[MONTH] < 0 || a[MONTH] > 11
? MONTH
: a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
- ? DATE
- : a[HOUR] < 0 ||
- a[HOUR] > 24 ||
- (a[HOUR] === 24 &&
- (a[MINUTE] !== 0 ||
- a[SECOND] !== 0 ||
- a[MILLISECOND] !== 0))
- ? HOUR
- : a[MINUTE] < 0 || a[MINUTE] > 59
- ? MINUTE
- : a[SECOND] < 0 || a[SECOND] > 59
- ? SECOND
- : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
- ? MILLISECOND
- : -1;
+ ? DATE
+ : a[HOUR] < 0 ||
+ a[HOUR] > 24 ||
+ (a[HOUR] === 24 &&
+ (a[MINUTE] !== 0 ||
+ a[SECOND] !== 0 ||
+ a[MILLISECOND] !== 0))
+ ? HOUR
+ : a[MINUTE] < 0 || a[MINUTE] > 59
+ ? MINUTE
+ : a[SECOND] < 0 || a[SECOND] > 59
+ ? SECOND
+ : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
+ ? MILLISECOND
+ : -1;
if (
getParsingFlags(m)._overflowDayOfYear &&
@@ -2301,8 +2374,10 @@
// iso 8601 regex
// 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)
- 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)?)?$/,
- 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)?)?$/,
+ 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)?)?$/,
+ 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)?)?$/,
tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
isoDates = [
['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
@@ -2333,7 +2408,8 @@
],
aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
- rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
+ rfc2822 =
+ /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
obsOffsets = {
UT: 0,
GMT: 0,
@@ -2356,12 +2432,13 @@
allowTime,
dateFormat,
timeFormat,
- tzFormat;
+ tzFormat,
+ isoDatesLen = isoDates.length,
+ isoTimesLen = isoTimes.length;
if (match) {
getParsingFlags(config).iso = true;
-
- for (i = 0, l = isoDates.length; i < l; i++) {
+ for (i = 0, l = isoDatesLen; i < l; i++) {
if (isoDates[i][1].exec(match[1])) {
dateFormat = isoDates[i][0];
allowTime = isoDates[i][2] !== false;
@@ -2373,7 +2450,7 @@
return;
}
if (match[3]) {
- for (i = 0, l = isoTimes.length; i < l; i++) {
+ for (i = 0, l = isoTimesLen; i < l; i++) {
if (isoTimes[i][1].exec(match[3])) {
// match[2] should be 'T' or space
timeFormat = (match[2] || ' ') + isoTimes[i][0];
@@ -2440,7 +2517,7 @@
function preprocessRFC2822(s) {
// Remove comments and folding whitespace and replace multiple-spaces with a single space
return s
- .replace(/\([^)]*\)|[\n\t]/g, ' ')
+ .replace(/\([^()]*\)|[\n\t]/g, ' ')
.replace(/(\s\s+)/g, ' ')
.replace(/^\s\s*/, '')
.replace(/\s\s*$/, '');
@@ -2540,8 +2617,7 @@
hooks.createFromInputFallback = deprecate(
'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
- 'discouraged and will be removed in an upcoming major release. Please refer to ' +
- 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
+ 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
function (config) {
config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
}
@@ -2754,17 +2830,16 @@
skipped,
stringLength = string.length,
totalParsedInputLength = 0,
- era;
+ era,
+ tokenLen;
tokens =
expandFormat(config._f, config._locale).match(formattingTokens) || [];
-
- for (i = 0; i < tokens.length; i++) {
+ tokenLen = tokens.length;
+ for (i = 0; i < tokenLen; i++) {
token = tokens[i];
parsedInput = (string.match(getParseRegexForToken(token, config)) ||
[])[0];
- // console.log('token', token, 'parsedInput', parsedInput,
- // 'regex', getParseRegexForToken(token, config));
if (parsedInput) {
skipped = string.substr(0, string.indexOf(parsedInput));
if (skipped.length > 0) {
@@ -2856,15 +2931,16 @@
i,
currentScore,
validFormatFound,
- bestFormatIsValid = false;
+ bestFormatIsValid = false,
+ configfLen = config._f.length;
- if (config._f.length === 0) {
+ if (configfLen === 0) {
getParsingFlags(config).invalidFormat = true;
config._d = new Date(NaN);
return;
}
- for (i = 0; i < config._f.length; i++) {
+ for (i = 0; i < configfLen; i++) {
currentScore = 0;
validFormatFound = false;
tempConfig = copyConfig({}, config);
@@ -3105,7 +3181,8 @@
function isDurationValid(m) {
var key,
unitHasDecimal = false,
- i;
+ i,
+ orderLen = ordering.length;
for (key in m) {
if (
hasOwnProp(m, key) &&
@@ -3118,7 +3195,7 @@
}
}
- for (i = 0; i < ordering.length; ++i) {
+ for (i = 0; i < orderLen; ++i) {
if (m[ordering[i]]) {
if (unitHasDecimal) {
return false; // only allow non-integers for smallest unit
@@ -3443,7 +3520,8 @@
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
// and further modified to allow for strings containing both week and day
- isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
+ isoRegex =
+ /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function createDuration(input, key) {
var duration = input,
@@ -3664,9 +3742,10 @@
'ms',
],
i,
- property;
+ property,
+ propertyLen = properties.length;
- for (i = 0; i < properties.length; i += 1) {
+ for (i = 0; i < propertyLen; i += 1) {
property = properties[i];
propertyTest = propertyTest || hasOwnProp(input, property);
}
@@ -3713,22 +3792,25 @@
return diff < -6
? 'sameElse'
: diff < -1
- ? 'lastWeek'
- : diff < 0
- ? 'lastDay'
- : diff < 1
- ? 'sameDay'
- : diff < 2
- ? 'nextDay'
- : diff < 7
- ? 'nextWeek'
- : 'sameElse';
+ ? 'lastWeek'
+ : diff < 0
+ ? 'lastDay'
+ : diff < 1
+ ? 'sameDay'
+ : diff < 2
+ ? 'nextDay'
+ : diff < 7
+ ? 'nextWeek'
+ : 'sameElse';
}
function calendar$1(time, formats) {
// Support for single parameter, formats only overload to the calendar function
if (arguments.length === 1) {
- if (isMomentInput(arguments[0])) {
+ if (!arguments[0]) {
+ time = undefined;
+ formats = undefined;
+ } else if (isMomentInput(arguments[0])) {
time = arguments[0];
formats = undefined;
} else if (isCalendarSpec(arguments[0])) {
@@ -4286,19 +4368,17 @@
addRegexToken('NNNN', matchEraName);
addRegexToken('NNNNN', matchEraNarrow);
- addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (
- input,
- array,
- config,
- token
- ) {
- var era = config._locale.erasParse(input, token, config._strict);
- if (era) {
- getParsingFlags(config).era = era;
- } else {
- getParsingFlags(config).invalidEra = input;
+ addParseToken(
+ ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
+ function (input, array, config, token) {
+ var era = config._locale.erasParse(input, token, config._strict);
+ if (era) {
+ getParsingFlags(config).era = era;
+ } else {
+ getParsingFlags(config).invalidEra = input;
+ }
}
- });
+ );
addRegexToken('y', matchUnsigned);
addRegexToken('yy', matchUnsigned);
@@ -4406,7 +4486,7 @@
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
- val = this.startOf('day').valueOf();
+ val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].name;
@@ -4426,7 +4506,7 @@
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
- val = this.startOf('day').valueOf();
+ val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].narrow;
@@ -4446,7 +4526,7 @@
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
- val = this.startOf('day').valueOf();
+ val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].abbr;
@@ -4469,7 +4549,7 @@
dir = eras[i].since <= eras[i].until ? +1 : -1;
// truncate time
- val = this.startOf('day').valueOf();
+ val = this.clone().startOf('day').valueOf();
if (
(eras[i].since <= val && val <= eras[i].until) ||
@@ -4529,16 +4609,22 @@
mixedPieces = [],
i,
l,
+ erasName,
+ erasAbbr,
+ erasNarrow,
eras = this.eras();
for (i = 0, l = eras.length; i < l; ++i) {
- namePieces.push(regexEscape(eras[i].name));
- abbrPieces.push(regexEscape(eras[i].abbr));
- narrowPieces.push(regexEscape(eras[i].narrow));
+ erasName = regexEscape(eras[i].name);
+ erasAbbr = regexEscape(eras[i].abbr);
+ erasNarrow = regexEscape(eras[i].narrow);
- mixedPieces.push(regexEscape(eras[i].name));
- mixedPieces.push(regexEscape(eras[i].abbr));
- mixedPieces.push(regexEscape(eras[i].narrow));
+ namePieces.push(erasName);
+ abbrPieces.push(erasAbbr);
+ narrowPieces.push(erasNarrow);
+ mixedPieces.push(erasName);
+ mixedPieces.push(erasAbbr);
+ mixedPieces.push(erasNarrow);
}
this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
@@ -4571,14 +4657,6 @@
// ALIASES
- addUnitAlias('weekYear', 'gg');
- addUnitAlias('isoWeekYear', 'GG');
-
- // PRIORITY
-
- addUnitPriority('weekYear', 1);
- addUnitPriority('isoWeekYear', 1);
-
// PARSING
addRegexToken('G', matchSigned);
@@ -4590,14 +4668,12 @@
addRegexToken('GGGGG', match1to6, match6);
addRegexToken('ggggg', match1to6, match6);
- addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (
- input,
- week,
- config,
- token
- ) {
- week[token.substr(0, 2)] = toInt(input);
- });
+ addWeekParseToken(
+ ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
+ function (input, week, config, token) {
+ week[token.substr(0, 2)] = toInt(input);
+ }
+ );
addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
week[token] = hooks.parseTwoDigitYear(input);
@@ -4610,7 +4686,7 @@
this,
input,
this.week(),
- this.weekday(),
+ this.weekday() + this.localeData()._week.dow,
this.localeData()._week.dow,
this.localeData()._week.doy
);
@@ -4672,14 +4748,6 @@
addFormatToken('Q', 0, 'Qo', 'quarter');
- // ALIASES
-
- addUnitAlias('quarter', 'Q');
-
- // PRIORITY
-
- addUnitPriority('quarter', 7);
-
// PARSING
addRegexToken('Q', match1);
@@ -4699,16 +4767,9 @@
addFormatToken('D', ['DD', 2], 'Do', 'date');
- // ALIASES
-
- addUnitAlias('date', 'D');
-
- // PRIORITY
- addUnitPriority('date', 9);
-
// PARSING
- addRegexToken('D', match1to2);
+ addRegexToken('D', match1to2, match1to2NoLeadingZero);
addRegexToken('DD', match1to2, match2);
addRegexToken('Do', function (isStrict, locale) {
// TODO: Remove "ordinalParse" fallback in next major release.
@@ -4730,13 +4791,6 @@
addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
- // ALIASES
-
- addUnitAlias('dayOfYear', 'DDD');
-
- // PRIORITY
- addUnitPriority('dayOfYear', 4);
-
// PARSING
addRegexToken('DDD', match1to3);
@@ -4761,17 +4815,9 @@
addFormatToken('m', ['mm', 2], 0, 'minute');
- // ALIASES
-
- addUnitAlias('minute', 'm');
-
- // PRIORITY
-
- addUnitPriority('minute', 14);
-
// PARSING
- addRegexToken('m', match1to2);
+ addRegexToken('m', match1to2, match1to2HasZero);
addRegexToken('mm', match1to2, match2);
addParseToken(['m', 'mm'], MINUTE);
@@ -4783,17 +4829,9 @@
addFormatToken('s', ['ss', 2], 0, 'second');
- // ALIASES
-
- addUnitAlias('second', 's');
-
- // PRIORITY
-
- addUnitPriority('second', 15);
-
// PARSING
- addRegexToken('s', match1to2);
+ addRegexToken('s', match1to2, match1to2HasZero);
addRegexToken('ss', match1to2, match2);
addParseToken(['s', 'ss'], SECOND);
@@ -4831,14 +4869,6 @@
return this.millisecond() * 1000000;
});
- // ALIASES
-
- addUnitAlias('millisecond', 'ms');
-
- // PRIORITY
-
- addUnitPriority('millisecond', 16);
-
// PARSING
addRegexToken('S', match1to3, match1);
@@ -5146,12 +5176,12 @@
toInt((number % 100) / 10) === 1
? 'th'
: b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
return number + output;
},
});
@@ -5324,19 +5354,6 @@
}
}
- // TODO: Use this.as('ms')?
- function valueOf$1() {
- if (!this.isValid()) {
- return NaN;
- }
- return (
- this._milliseconds +
- this._days * 864e5 +
- (this._months % 12) * 2592e6 +
- toInt(this._months / 12) * 31536e6
- );
- }
-
function makeAs(alias) {
return function () {
return this.as(alias);
@@ -5351,7 +5368,8 @@
asWeeks = makeAs('w'),
asMonths = makeAs('M'),
asQuarters = makeAs('Q'),
- asYears = makeAs('y');
+ asYears = makeAs('y'),
+ valueOf$1 = asMilliseconds;
function clone$1() {
return createDuration(this);
@@ -5620,7 +5638,7 @@
//! moment.js
- hooks.version = '2.25.2';
+ hooks.version = '2.30.1';
setHookCallback(createLocal);