aboutsummaryrefslogtreecommitdiffstats
path: root/library/moment/src/lib/locale/set.js
diff options
context:
space:
mode:
Diffstat (limited to 'library/moment/src/lib/locale/set.js')
-rw-r--r--library/moment/src/lib/locale/set.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/library/moment/src/lib/locale/set.js b/library/moment/src/lib/locale/set.js
new file mode 100644
index 000000000..32db2ad79
--- /dev/null
+++ b/library/moment/src/lib/locale/set.js
@@ -0,0 +1,14 @@
+export function set (config) {
+ var prop, i;
+ for (i in config) {
+ prop = config[i];
+ if (typeof prop === 'function') {
+ this[i] = prop;
+ } else {
+ this['_' + i] = prop;
+ }
+ }
+ // Lenient ordinal parsing accepts just a number in addition to
+ // number + (possibly) stuff coming from _ordinalParseLenient.
+ this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);
+}