aboutsummaryrefslogtreecommitdiff
path: root/node_modules/moment/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/moment/src/lib')
-rw-r--r--node_modules/moment/src/lib/locale/locales.js7
-rw-r--r--node_modules/moment/src/lib/moment/get-set.js2
-rw-r--r--node_modules/moment/src/lib/parse/regex.js2
3 files changed, 6 insertions, 5 deletions
diff --git a/node_modules/moment/src/lib/locale/locales.js b/node_modules/moment/src/lib/locale/locales.js
index 4efebb8ff..7d8fb26e0 100644
--- a/node_modules/moment/src/lib/locale/locales.js
+++ b/node_modules/moment/src/lib/locale/locales.js
@@ -131,10 +131,11 @@ export function defineLocale (name, config) {
export function updateLocale(name, config) {
if (config != null) {
- var locale, parentConfig = baseConfig;
+ var locale, tmpLocale, parentConfig = baseConfig;
// MERGE
- if (locales[name] != null) {
- parentConfig = locales[name]._config;
+ tmpLocale = loadLocale(name);
+ if (tmpLocale != null) {
+ parentConfig = tmpLocale._config;
}
config = mergeConfigs(parentConfig, config);
locale = new Locale(config);
diff --git a/node_modules/moment/src/lib/moment/get-set.js b/node_modules/moment/src/lib/moment/get-set.js
index ce5ac823d..f5035f1a4 100644
--- a/node_modules/moment/src/lib/moment/get-set.js
+++ b/node_modules/moment/src/lib/moment/get-set.js
@@ -24,7 +24,7 @@ export function get (mom, unit) {
export function set (mom, unit, value) {
if (mom.isValid() && !isNaN(value)) {
- if (unit === 'FullYear' && isLeapYear(mom.year())) {
+ if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
}
else {
diff --git a/node_modules/moment/src/lib/parse/regex.js b/node_modules/moment/src/lib/parse/regex.js
index b1dc7529e..5076548ed 100644
--- a/node_modules/moment/src/lib/parse/regex.js
+++ b/node_modules/moment/src/lib/parse/regex.js
@@ -20,7 +20,7 @@ export var 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
-export var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
+export var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
import hasOwnProp from '../utils/has-own-prop';