summaryrefslogtreecommitdiff
path: root/www/lib/moment/src
diff options
context:
space:
mode:
authorPliablePixels <pliablepixels@gmail.com>2015-07-02 10:33:26 -0400
committerPliablePixels <pliablepixels@gmail.com>2015-07-02 10:33:26 -0400
commitf3136eefe9105deb1d97123629dae80c2de66304 (patch)
tree5389bd34d555ab4c3c065292e17cd41576db33ae /www/lib/moment/src
parent5e523cf0d1a3644f6a41709b777b08f73ec71d49 (diff)
updated libraries, squashed the problem of not getting bar handles on click, optimized montage view
Diffstat (limited to 'www/lib/moment/src')
-rw-r--r--www/lib/moment/src/lib/create/check-overflow.js7
-rw-r--r--www/lib/moment/src/lib/create/from-anything.js4
-rw-r--r--www/lib/moment/src/lib/create/from-array.js3
-rw-r--r--www/lib/moment/src/lib/create/from-string-and-array.js11
-rw-r--r--www/lib/moment/src/lib/create/from-string-and-format.js21
-rw-r--r--www/lib/moment/src/lib/create/from-string.js3
-rw-r--r--www/lib/moment/src/lib/create/parsing-flags.js (renamed from www/lib/moment/src/lib/create/default-parsing-flags.js)9
-rw-r--r--www/lib/moment/src/lib/create/valid.js24
-rw-r--r--www/lib/moment/src/lib/duration/as.js12
-rw-r--r--www/lib/moment/src/lib/locale/set.js2
-rw-r--r--www/lib/moment/src/lib/moment/constructor.js5
-rw-r--r--www/lib/moment/src/lib/moment/from.js3
-rw-r--r--www/lib/moment/src/lib/moment/prototype.js3
-rw-r--r--www/lib/moment/src/lib/moment/to.js13
-rw-r--r--www/lib/moment/src/lib/moment/valid.js5
-rw-r--r--www/lib/moment/src/lib/units/day-of-week.js3
-rw-r--r--www/lib/moment/src/lib/units/hour.js3
-rw-r--r--www/lib/moment/src/lib/units/month.js3
-rw-r--r--www/lib/moment/src/lib/utils/deprecate.js6
-rw-r--r--www/lib/moment/src/lib/utils/is-date.js2
-rw-r--r--www/lib/moment/src/locale/ar.js4
-rw-r--r--www/lib/moment/src/locale/cv.js45
-rw-r--r--www/lib/moment/src/locale/es.js10
-rw-r--r--www/lib/moment/src/locale/hr.js4
-rw-r--r--www/lib/moment/src/locale/jv.js73
-rw-r--r--www/lib/moment/src/locale/lv.js49
-rw-r--r--www/lib/moment/src/locale/me.js99
-rw-r--r--www/lib/moment/src/locale/my.js5
-rw-r--r--www/lib/moment/src/locale/pl.js8
-rw-r--r--www/lib/moment/src/locale/pt-br.js10
-rw-r--r--www/lib/moment/src/locale/pt.js10
-rw-r--r--www/lib/moment/src/locale/si.js56
-rw-r--r--www/lib/moment/src/locale/sl.js86
-rw-r--r--www/lib/moment/src/locale/sv.js4
-rw-r--r--www/lib/moment/src/locale/zh-cn.js22
-rw-r--r--www/lib/moment/src/locale/zh-tw.js3
-rw-r--r--www/lib/moment/src/moment.js4
37 files changed, 467 insertions, 167 deletions
diff --git a/www/lib/moment/src/lib/create/check-overflow.js b/www/lib/moment/src/lib/create/check-overflow.js
index 7ee7556f..88a62ae5 100644
--- a/www/lib/moment/src/lib/create/check-overflow.js
+++ b/www/lib/moment/src/lib/create/check-overflow.js
@@ -1,11 +1,12 @@
import { daysInMonth } from '../units/month';
import { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND } from '../units/constants';
+import getParsingFlags from '../create/parsing-flags';
export default function checkOverflow (m) {
var overflow;
var a = m._a;
- if (a && m._pf.overflow === -2) {
+ if (a && getParsingFlags(m).overflow === -2) {
overflow =
a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
@@ -15,11 +16,11 @@ export default function checkOverflow (m) {
a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
-1;
- if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
+ if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
overflow = DATE;
}
- m._pf.overflow = overflow;
+ getParsingFlags(m).overflow = overflow;
}
return m;
diff --git a/www/lib/moment/src/lib/create/from-anything.js b/www/lib/moment/src/lib/create/from-anything.js
index a5a59f35..4b836c0f 100644
--- a/www/lib/moment/src/lib/create/from-anything.js
+++ b/www/lib/moment/src/lib/create/from-anything.js
@@ -1,4 +1,3 @@
-import defaultParsingFlags from './default-parsing-flags';
import isArray from '../utils/is-array';
import isDate from '../utils/is-date';
import map from '../utils/map';
@@ -35,6 +34,8 @@ function createFromConfig (config) {
configFromStringAndArray(config);
} else if (format) {
configFromStringAndFormat(config);
+ } else if (isDate(input)) {
+ config._d = input;
} else {
configFromInput(config);
}
@@ -87,7 +88,6 @@ export function createLocalOrUTC (input, format, locale, strict, isUTC) {
c._i = input;
c._f = format;
c._strict = strict;
- c._pf = defaultParsingFlags();
return createFromConfig(c);
}
diff --git a/www/lib/moment/src/lib/create/from-array.js b/www/lib/moment/src/lib/create/from-array.js
index dea1e851..c4239cb7 100644
--- a/www/lib/moment/src/lib/create/from-array.js
+++ b/www/lib/moment/src/lib/create/from-array.js
@@ -5,6 +5,7 @@ import { dayOfYearFromWeeks } from '../units/day-of-year';
import { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND } from '../units/constants';
import { createLocal } from './local';
import defaults from '../utils/defaults';
+import getParsingFlags from './parsing-flags';
function currentDateArray(config) {
var now = new Date();
@@ -37,7 +38,7 @@ export function configFromArray (config) {
yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
if (config._dayOfYear > daysInYear(yearToUse)) {
- config._pf._overflowDayOfYear = true;
+ getParsingFlags(config)._overflowDayOfYear = true;
}
date = createUTCDate(yearToUse, 0, config._dayOfYear);
diff --git a/www/lib/moment/src/lib/create/from-string-and-array.js b/www/lib/moment/src/lib/create/from-string-and-array.js
index e44af67f..1d8a7a80 100644
--- a/www/lib/moment/src/lib/create/from-string-and-array.js
+++ b/www/lib/moment/src/lib/create/from-string-and-array.js
@@ -1,6 +1,6 @@
import { copyConfig } from '../moment/constructor';
import { configFromStringAndFormat } from './from-string-and-format';
-import defaultParsingFlags from './default-parsing-flags';
+import getParsingFlags from './parsing-flags';
import { isValid } from './valid';
import extend from '../utils/extend';
@@ -14,7 +14,7 @@ export function configFromStringAndArray(config) {
currentScore;
if (config._f.length === 0) {
- config._pf.invalidFormat = true;
+ getParsingFlags(config).invalidFormat = true;
config._d = new Date(NaN);
return;
}
@@ -25,7 +25,6 @@ export function configFromStringAndArray(config) {
if (config._useUTC != null) {
tempConfig._useUTC = config._useUTC;
}
- tempConfig._pf = defaultParsingFlags();
tempConfig._f = config._f[i];
configFromStringAndFormat(tempConfig);
@@ -34,12 +33,12 @@ export function configFromStringAndArray(config) {
}
// if there is any input that was not parsed add a penalty for that format
- currentScore += tempConfig._pf.charsLeftOver;
+ currentScore += getParsingFlags(tempConfig).charsLeftOver;
//or tokens
- currentScore += tempConfig._pf.unusedTokens.length * 10;
+ currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
- tempConfig._pf.score = currentScore;
+ getParsingFlags(tempConfig).score = currentScore;
if (scoreToBeat == null || currentScore < scoreToBeat) {
scoreToBeat = currentScore;
diff --git a/www/lib/moment/src/lib/create/from-string-and-format.js b/www/lib/moment/src/lib/create/from-string-and-format.js
index 8a75873a..ae48b903 100644
--- a/www/lib/moment/src/lib/create/from-string-and-format.js
+++ b/www/lib/moment/src/lib/create/from-string-and-format.js
@@ -6,6 +6,7 @@ import { expandFormat, formatTokenFunctions, formattingTokens } from '../format/
import checkOverflow from './check-overflow';
import { HOUR } from '../units/constants';
import { hooks } from '../utils/hooks';
+import getParsingFlags from './parsing-flags';
// constant that refers to the ISO standard
hooks.ISO_8601 = function () {};
@@ -19,7 +20,7 @@ export function configFromStringAndFormat(config) {
}
config._a = [];
- config._pf.empty = true;
+ getParsingFlags(config).empty = true;
// This array is used to make a Date, either with `new Date` or `Date.UTC`
var string = '' + config._i,
@@ -35,7 +36,7 @@ export function configFromStringAndFormat(config) {
if (parsedInput) {
skipped = string.substr(0, string.indexOf(parsedInput));
if (skipped.length > 0) {
- config._pf.unusedInput.push(skipped);
+ getParsingFlags(config).unusedInput.push(skipped);
}
string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
totalParsedInputLength += parsedInput.length;
@@ -43,27 +44,29 @@ export function configFromStringAndFormat(config) {
// don't parse if it's not a known token
if (formatTokenFunctions[token]) {
if (parsedInput) {
- config._pf.empty = false;
+ getParsingFlags(config).empty = false;
}
else {
- config._pf.unusedTokens.push(token);
+ getParsingFlags(config).unusedTokens.push(token);
}
addTimeToArrayFromToken(token, parsedInput, config);
}
else if (config._strict && !parsedInput) {
- config._pf.unusedTokens.push(token);
+ getParsingFlags(config).unusedTokens.push(token);
}
}
// add remaining unparsed input length to the string
- config._pf.charsLeftOver = stringLength - totalParsedInputLength;
+ getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
if (string.length > 0) {
- config._pf.unusedInput.push(string);
+ getParsingFlags(config).unusedInput.push(string);
}
// clear _12h flag if hour is <= 12
- if (config._pf.bigHour === true && config._a[HOUR] <= 12) {
- config._pf.bigHour = undefined;
+ if (getParsingFlags(config).bigHour === true &&
+ config._a[HOUR] <= 12 &&
+ config._a[HOUR] > 0) {
+ getParsingFlags(config).bigHour = undefined;
}
// handle meridiem
config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
diff --git a/www/lib/moment/src/lib/create/from-string.js b/www/lib/moment/src/lib/create/from-string.js
index 052d3be3..4bd6d591 100644
--- a/www/lib/moment/src/lib/create/from-string.js
+++ b/www/lib/moment/src/lib/create/from-string.js
@@ -2,6 +2,7 @@ import { matchOffset } from '../parse/regex';
import { configFromStringAndFormat } from './from-string-and-format';
import { hooks } from '../utils/hooks';
import { deprecate } from '../utils/deprecate';
+import getParsingFlags from './parsing-flags';
// 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)
@@ -32,7 +33,7 @@ export function configFromISO(config) {
match = isoRegex.exec(string);
if (match) {
- config._pf.iso = true;
+ getParsingFlags(config).iso = true;
for (i = 0, l = isoDates.length; i < l; i++) {
if (isoDates[i][1].exec(string)) {
// match[5] should be 'T' or undefined
diff --git a/www/lib/moment/src/lib/create/default-parsing-flags.js b/www/lib/moment/src/lib/create/parsing-flags.js
index 0732d5bf..2bfbcb34 100644
--- a/www/lib/moment/src/lib/create/default-parsing-flags.js
+++ b/www/lib/moment/src/lib/create/parsing-flags.js
@@ -1,4 +1,4 @@
-export default function defaultParsingFlags() {
+function defaultParsingFlags() {
// We need to deep clone this object.
return {
empty : false,
@@ -13,3 +13,10 @@ export default function defaultParsingFlags() {
iso : false
};
}
+
+export default function getParsingFlags(m) {
+ if (m._pf == null) {
+ m._pf = defaultParsingFlags();
+ }
+ return m._pf;
+}
diff --git a/www/lib/moment/src/lib/create/valid.js b/www/lib/moment/src/lib/create/valid.js
index a5aaba00..89204f85 100644
--- a/www/lib/moment/src/lib/create/valid.js
+++ b/www/lib/moment/src/lib/create/valid.js
@@ -1,21 +1,23 @@
import extend from '../utils/extend';
import { createUTC } from './utc';
+import getParsingFlags from '../create/parsing-flags';
export function isValid(m) {
if (m._isValid == null) {
+ var flags = getParsingFlags(m);
m._isValid = !isNaN(m._d.getTime()) &&
- m._pf.overflow < 0 &&
- !m._pf.empty &&
- !m._pf.invalidMonth &&
- !m._pf.nullInput &&
- !m._pf.invalidFormat &&
- !m._pf.userInvalidated;
+ flags.overflow < 0 &&
+ !flags.empty &&
+ !flags.invalidMonth &&
+ !flags.nullInput &&
+ !flags.invalidFormat &&
+ !flags.userInvalidated;
if (m._strict) {
m._isValid = m._isValid &&
- m._pf.charsLeftOver === 0 &&
- m._pf.unusedTokens.length === 0 &&
- m._pf.bigHour === undefined;
+ flags.charsLeftOver === 0 &&
+ flags.unusedTokens.length === 0 &&
+ flags.bigHour === undefined;
}
}
return m._isValid;
@@ -24,10 +26,10 @@ export function isValid(m) {
export function createInvalid (flags) {
var m = createUTC(NaN);
if (flags != null) {
- extend(m._pf, flags);
+ extend(getParsingFlags(m), flags);
}
else {
- m._pf.userInvalidated = true;
+ getParsingFlags(m).userInvalidated = true;
}
return m;
diff --git a/www/lib/moment/src/lib/duration/as.js b/www/lib/moment/src/lib/duration/as.js
index aa9731d0..258c501e 100644
--- a/www/lib/moment/src/lib/duration/as.js
+++ b/www/lib/moment/src/lib/duration/as.js
@@ -17,13 +17,13 @@ export function as (units) {
// handle milliseconds separately because of floating point math errors (issue #1867)
days = this._days + Math.round(yearsToDays(this._months / 12));
switch (units) {
- case 'week' : return days / 7 + milliseconds / 6048e5;
- case 'day' : return days + milliseconds / 864e5;
- case 'hour' : return days * 24 + milliseconds / 36e5;
- case 'minute' : return days * 24 * 60 + milliseconds / 6e4;
- case 'second' : return days * 24 * 60 * 60 + milliseconds / 1000;
+ case 'week' : return days / 7 + milliseconds / 6048e5;
+ case 'day' : return days + milliseconds / 864e5;
+ case 'hour' : return days * 24 + milliseconds / 36e5;
+ case 'minute' : return days * 1440 + milliseconds / 6e4;
+ case 'second' : return days * 86400 + milliseconds / 1000;
// Math.floor prevents floating point math errors here
- case 'millisecond': return Math.floor(days * 24 * 60 * 60 * 1000) + milliseconds;
+ case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
default: throw new Error('Unknown unit ' + units);
}
}
diff --git a/www/lib/moment/src/lib/locale/set.js b/www/lib/moment/src/lib/locale/set.js
index b9eb5ed6..32db2ad7 100644
--- a/www/lib/moment/src/lib/locale/set.js
+++ b/www/lib/moment/src/lib/locale/set.js
@@ -10,5 +10,5 @@ export function set (config) {
}
// 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);
+ this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);
}
diff --git a/www/lib/moment/src/lib/moment/constructor.js b/www/lib/moment/src/lib/moment/constructor.js
index 2376cae7..f7355939 100644
--- a/www/lib/moment/src/lib/moment/constructor.js
+++ b/www/lib/moment/src/lib/moment/constructor.js
@@ -1,5 +1,6 @@
import { hooks } from '../utils/hooks';
import hasOwnProp from '../utils/has-own-prop';
+import getParsingFlags from '../create/parsing-flags';
// Plugins that add properties should also add the key here (null value),
// so we can properly clone ourselves.
@@ -33,7 +34,7 @@ export function copyConfig(to, from) {
to._offset = from._offset;
}
if (typeof from._pf !== 'undefined') {
- to._pf = from._pf;
+ to._pf = getParsingFlags(from);
}
if (typeof from._locale !== 'undefined') {
to._locale = from._locale;
@@ -68,5 +69,5 @@ export function Moment(config) {
}
export function isMoment (obj) {
- return obj instanceof Moment || (obj != null && hasOwnProp(obj, '_isAMomentObject'));
+ return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
}
diff --git a/www/lib/moment/src/lib/moment/from.js b/www/lib/moment/src/lib/moment/from.js
index 0044eede..c6a5449f 100644
--- a/www/lib/moment/src/lib/moment/from.js
+++ b/www/lib/moment/src/lib/moment/from.js
@@ -2,6 +2,9 @@ import { createDuration } from '../duration/create';
import { createLocal } from '../create/local';
export function from (time, withoutSuffix) {
+ if (!this.isValid()) {
+ return this.localeData().invalidDate();
+ }
return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
}
diff --git a/www/lib/moment/src/lib/moment/prototype.js b/www/lib/moment/src/lib/moment/prototype.js
index b31b80e7..5601bc0b 100644
--- a/www/lib/moment/src/lib/moment/prototype.js
+++ b/www/lib/moment/src/lib/moment/prototype.js
@@ -9,6 +9,7 @@ import { isBefore, isBetween, isSame, isAfter } from './compare';
import { diff } from './diff';
import { format, toString, toISOString } from './format';
import { from, fromNow } from './from';
+import { to, toNow } from './to';
import { getSet } from './get-set';
import { locale, localeData, lang } from './locale';
import { prototypeMin, prototypeMax } from './min-max';
@@ -24,6 +25,8 @@ proto.endOf = endOf;
proto.format = format;
proto.from = from;
proto.fromNow = fromNow;
+proto.to = to;
+proto.toNow = toNow;
proto.get = getSet;
proto.invalidAt = invalidAt;
proto.isAfter = isAfter;
diff --git a/www/lib/moment/src/lib/moment/to.js b/www/lib/moment/src/lib/moment/to.js
new file mode 100644
index 00000000..d9eccfde
--- /dev/null
+++ b/www/lib/moment/src/lib/moment/to.js
@@ -0,0 +1,13 @@
+import { createDuration } from '../duration/create';
+import { createLocal } from '../create/local';
+
+export function to (time, withoutSuffix) {
+ if (!this.isValid()) {
+ return this.localeData().invalidDate();
+ }
+ return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
+}
+
+export function toNow (withoutSuffix) {
+ return this.to(createLocal(), withoutSuffix);
+}
diff --git a/www/lib/moment/src/lib/moment/valid.js b/www/lib/moment/src/lib/moment/valid.js
index ffd47de8..6c007429 100644
--- a/www/lib/moment/src/lib/moment/valid.js
+++ b/www/lib/moment/src/lib/moment/valid.js
@@ -1,14 +1,15 @@
import { isValid as _isValid } from '../create/valid';
import extend from '../utils/extend';
+import getParsingFlags from '../create/parsing-flags';
export function isValid () {
return _isValid(this);
}
export function parsingFlags () {
- return extend({}, this._pf);
+ return extend({}, getParsingFlags(this));
}
export function invalidAt () {
- return this._pf.overflow;
+ return getParsingFlags(this).overflow;
}
diff --git a/www/lib/moment/src/lib/units/day-of-week.js b/www/lib/moment/src/lib/units/day-of-week.js
index c1cf9527..7af24083 100644
--- a/www/lib/moment/src/lib/units/day-of-week.js
+++ b/www/lib/moment/src/lib/units/day-of-week.js
@@ -4,6 +4,7 @@ import { addRegexToken, match1to2, matchWord } from '../parse/regex';
import { addWeekParseToken } from '../parse/token';
import toInt from '../utils/to-int';
import { createLocal } from '../create/local';
+import getParsingFlags from '../create/parsing-flags';
// FORMATTING
@@ -45,7 +46,7 @@ addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config) {
if (weekday != null) {
week.d = weekday;
} else {
- config._pf.invalidWeekday = input;
+ getParsingFlags(config).invalidWeekday = input;
}
});
diff --git a/www/lib/moment/src/lib/units/hour.js b/www/lib/moment/src/lib/units/hour.js
index 2c6836ae..356c74d2 100644
--- a/www/lib/moment/src/lib/units/hour.js
+++ b/www/lib/moment/src/lib/units/hour.js
@@ -5,6 +5,7 @@ import { addRegexToken, match1to2, match2 } from '../parse/regex';
import { addParseToken } from '../parse/token';
import { HOUR } from './constants';
import toInt from '../utils/to-int';
+import getParsingFlags from '../create/parsing-flags';
// FORMATTING
@@ -46,7 +47,7 @@ addParseToken(['a', 'A'], function (input, array, config) {
});
addParseToken(['h', 'hh'], function (input, array, config) {
array[HOUR] = toInt(input);
- config._pf.bigHour = true;
+ getParsingFlags(config).bigHour = true;
});
// LOCALES
diff --git a/www/lib/moment/src/lib/units/month.js b/www/lib/moment/src/lib/units/month.js
index 3c321371..63d18b47 100644
--- a/www/lib/moment/src/lib/units/month.js
+++ b/www/lib/moment/src/lib/units/month.js
@@ -7,6 +7,7 @@ import { hooks } from '../utils/hooks';
import { MONTH } from './constants';
import toInt from '../utils/to-int';
import { createUTC } from '../create/utc';
+import getParsingFlags from '../create/parsing-flags';
export function daysInMonth(year, month) {
return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
@@ -47,7 +48,7 @@ addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
if (month != null) {
array[MONTH] = month;
} else {
- config._pf.invalidMonth = input;
+ getParsingFlags(config).invalidMonth = input;
}
});
diff --git a/www/lib/moment/src/lib/utils/deprecate.js b/www/lib/moment/src/lib/utils/deprecate.js
index 80fecf02..a076ad71 100644
--- a/www/lib/moment/src/lib/utils/deprecate.js
+++ b/www/lib/moment/src/lib/utils/deprecate.js
@@ -8,10 +8,12 @@ function warn(msg) {
}
export function deprecate(msg, fn) {
- var firstTime = true;
+ var firstTime = true,
+ msgWithStack = msg + '\n' + (new Error()).stack;
+
return extend(function () {
if (firstTime) {
- warn(msg);
+ warn(msgWithStack);
firstTime = false;
}
return fn.apply(this, arguments);
diff --git a/www/lib/moment/src/lib/utils/is-date.js b/www/lib/moment/src/lib/utils/is-date.js
index 561fd715..69c4d0e9 100644
--- a/www/lib/moment/src/lib/utils/is-date.js
+++ b/www/lib/moment/src/lib/utils/is-date.js
@@ -1,3 +1,3 @@
export default function isDate(input) {
- return Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date;
+ return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
}
diff --git a/www/lib/moment/src/locale/ar.js b/www/lib/moment/src/locale/ar.js
index d3a5bfcc..689bc8f6 100644
--- a/www/lib/moment/src/locale/ar.js
+++ b/www/lib/moment/src/locale/ar.js
@@ -70,7 +70,7 @@ export default moment.defineLocale('ar', {
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
- L : 'DD/MM/YYYY',
+ L : 'D/\u200FM/\u200FYYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
LLLL : 'dddd D MMMM YYYY LT'
@@ -110,7 +110,7 @@ export default moment.defineLocale('ar', {
yy : pluralize('y')
},
preparse: function (string) {
- return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return string.replace(/\u200f/g, '').replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
return numberMap[match];
}).replace(/،/g, ',');
},
diff --git a/www/lib/moment/src/locale/cv.js b/www/lib/moment/src/locale/cv.js
index dc50da3a..09db067d 100644
--- a/www/lib/moment/src/locale/cv.js
+++ b/www/lib/moment/src/locale/cv.js
@@ -5,50 +5,49 @@
import moment from '../moment';
export default moment.defineLocale('cv', {
- months : 'кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав'.split('_'),
- monthsShort : 'кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш'.split('_'),
- weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун'.split('_'),
- weekdaysShort : 'выр_тун_ытл_юн_кĕç_эрн_шăм'.split('_'),
- weekdaysMin : 'вр_тн_ыт_юн_кç_эр_шм'.split('_'),
+ months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),
+ monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
+ weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),
+ weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
+ weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'LT:ss',
L : 'DD-MM-YYYY',
- LL : 'YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ]',
- LLL : 'YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT',
- LLLL : 'dddd, YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT'
+ LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
+ LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], LT',
+ LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], LT'
},
calendar : {
sameDay: '[Паян] LT [сехетре]',
nextDay: '[Ыран] LT [сехетре]',
- lastDay: '[Ĕнер] LT [сехетре]',
- nextWeek: '[Çитес] dddd LT [сехетре]',
- lastWeek: '[Иртнĕ] dddd LT [сехетре]',
+ lastDay: '[Ӗнер] LT [сехетре]',
+ nextWeek: '[Ҫитес] dddd LT [сехетре]',
+ lastWeek: '[Иртнӗ] dddd LT [сехетре]',
sameElse: 'L'
},
relativeTime : {
future : function (output) {
- var affix = /сехет$/i.exec(output) ? 'рен' : /çул$/i.exec(output) ? 'тан' : 'ран';
+ var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';
return output + affix;
},
past : '%s каялла',
- s : 'пĕр-ик çеккунт',
- m : 'пĕр минут',
+ s : 'пӗр-ик ҫеккунт',
+ m : 'пӗр минут',
mm : '%d минут',
- h : 'пĕр сехет',
+ h : 'пӗр сехет',
hh : '%d сехет',
- d : 'пĕр кун',
+ d : 'пӗр кун',
dd : '%d кун',
- M : 'пĕр уйăх',
- MM : '%d уйăх',
- y : 'пĕр çул',
- yy : '%d çул'
+ M : 'пӗр уйӑх',
+ MM : '%d уйӑх',
+ y : 'пӗр ҫул',
+ yy : '%d ҫул'
},
- ordinalParse: /\d{1,2}-мĕш/,
- ordinal : '%d-мĕш',
+ ordinalParse: /\d{1,2}-мӗш/,
+ ordinal : '%d-мӗш',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-
diff --git a/www/lib/moment/src/locale/es.js b/www/lib/moment/src/locale/es.js
index bcad0481..c9ea1f5e 100644
--- a/www/lib/moment/src/locale/es.js
+++ b/www/lib/moment/src/locale/es.js
@@ -4,11 +4,11 @@
import moment from '../moment';
-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('_');
+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('_');
export default moment.defineLocale('es', {
- months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
+ months : 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
monthsShort : function (m, format) {
if (/-MMM-/.test(format)) {
return monthsShort[m.month()];
@@ -16,8 +16,8 @@ export default moment.defineLocale('es', {
return monthsShortDot[m.month()];
}
},
- weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ 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('_'),
longDateFormat : {
LT : 'H:mm',
diff --git a/www/lib/moment/src/locale/hr.js b/www/lib/moment/src/locale/hr.js
index 76708440..eab62dfb 100644
--- a/www/lib/moment/src/locale/hr.js
+++ b/www/lib/moment/src/locale/hr.js
@@ -58,8 +58,8 @@ function translate(number, withoutSuffix, key) {
}
export default moment.defineLocale('hr', {
- months : 'sječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_'),
- monthsShort : 'sje._vel._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),
+ months : '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('_'),
weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),
diff --git a/www/lib/moment/src/locale/jv.js b/www/lib/moment/src/locale/jv.js
new file mode 100644
index 00000000..b5401a0a
--- /dev/null
+++ b/www/lib/moment/src/locale/jv.js
@@ -0,0 +1,73 @@
+//! moment.js locale configuration
+//! locale : Boso Jowo (jv)
+//! author : Rony Lantip : https://github.com/lantip
+//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
+
+import moment from '../moment';
+
+export default moment.defineLocale('jv', {
+ months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'),
+ monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
+ weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
+ weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
+ weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
+ longDateFormat : {
+ LT : 'HH.mm',
+ LTS : 'LT.ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY [pukul] LT',
+ LLLL : 'dddd, D MMMM YYYY [pukul] LT'
+ },
+ meridiemParse: /enjing|siyang|sonten|ndalu/,
+ meridiemHour : function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'enjing') {
+ return hour;
+ } else if (meridiem === 'siyang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
+ return hour + 12;
+ }
+ },
+ meridiem : function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'enjing';
+ } else if (hours < 15) {
+ return 'siyang';
+ } else if (hours < 19) {
+ return 'sonten';
+ } else {
+ return 'ndalu';
+ }
+ },
+ calendar : {
+ sameDay : '[Dinten puniko pukul] LT',
+ nextDay : '[Mbenjang pukul] LT',
+ nextWeek : 'dddd [pukul] LT',
+ lastDay : '[Kala wingi pukul] LT',
+ lastWeek : 'dddd [kepengker pukul] LT',
+ sameElse : 'L'
+ },
+ relativeTime : {
+ future : 'wonten ing %s',
+ past : '%s ingkang kepengker',
+ s : 'sawetawis detik',
+ m : 'setunggal menit',
+ mm : '%d menit',
+ h : 'setunggal jam',
+ hh : '%d jam',
+ d : 'sedinten',
+ dd : '%d dinten',
+ M : 'sewulan',
+ MM : '%d wulan',
+ y : 'setaun',
+ yy : '%d taun'
+ },
+ week : {
+ dow : 1, // Monday is the first day of the week.
+ doy : 7 // The week that contains Jan 1st is the first week of the year.
+ }
+});
diff --git a/www/lib/moment/src/locale/lv.js b/www/lib/moment/src/locale/lv.js
index 0506c851..b37cb5cf 100644
--- a/www/lib/moment/src/locale/lv.js
+++ b/www/lib/moment/src/locale/lv.js
@@ -1,27 +1,44 @@
//! moment.js locale configuration
//! locale : latvian (lv)
//! author : Kristaps Karlsons : https://github.com/skakri
+//! author : Jānis Elmeris : https://github.com/JanisE
import moment from '../moment';
var units = {
- 'mm': 'minūti_minūtes_minūte_minūtes',
- 'hh': 'stundu_stundas_stunda_stundas',
- 'dd': 'dienu_dienas_diena_dienas',
- 'MM': 'mēnesi_mēnešus_mēnesis_mēneši',
- 'yy': 'gadu_gadus_gads_gadi'
+ 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ 'h': 'stundas_stundām_stunda_stundas'.split('_'),
+ 'hh': 'stundas_stundām_stunda_stundas'.split('_'),
+ 'd': 'dienas_dienām_diena_dienas'.split('_'),
+ 'dd': 'dienas_dienām_diena_dienas'.split('_'),
+ 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ 'y': 'gada_gadiem_gads_gadi'.split('_'),
+ 'yy': 'gada_gadiem_gads_gadi'.split('_')
};
-function format(word, number, withoutSuffix) {
- var forms = word.split('_');
+/**
+ * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
+ */
+function format(forms, number, withoutSuffix) {
if (withoutSuffix) {
+ // E.g. "21 minūte", "3 minūtes".
return number % 10 === 1 && number !== 11 ? forms[2] : forms[3];
} else {
+ // E.g. "21 minūtes" as in "pēc 21 minūtes".
+ // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
return number % 10 === 1 && number !== 11 ? forms[0] : forms[1];
}
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
return number + ' ' + format(units[key], number, withoutSuffix);
}
+function relativeTimeWithSingular(number, withoutSuffix, key) {
+ return format(units[key], number, withoutSuffix);
+}
+function relativeSeconds(number, withoutSuffix) {
+ return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
+}
export default moment.defineLocale('lv', {
months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),
@@ -32,7 +49,7 @@ export default moment.defineLocale('lv', {
longDateFormat : {
LT : 'HH:mm',
LTS : 'LT:ss',
- L : 'DD.MM.YYYY',
+ L : 'DD.MM.YYYY.',
LL : 'YYYY. [gada] D. MMMM',
LLL : 'YYYY. [gada] D. MMMM, LT',
LLLL : 'YYYY. [gada] D. MMMM, dddd, LT'
@@ -46,18 +63,18 @@ export default moment.defineLocale('lv', {
sameElse : 'L'
},
relativeTime : {
- future : '%s vēlāk',
- past : '%s agrāk',
- s : 'dažas sekundes',
- m : 'minūti',
+ future : 'pēc %s',
+ past : 'pirms %s',
+ s : relativeSeconds,
+ m : relativeTimeWithSingular,
mm : relativeTimeWithPlural,
- h : 'stundu',
+ h : relativeTimeWithSingular,
hh : relativeTimeWithPlural,
- d : 'dienu',
+ d : relativeTimeWithSingular,
dd : relativeTimeWithPlural,
- M : 'mēnesi',
+ M : relativeTimeWithSingular,
MM : relativeTimeWithPlural,
- y : 'gadu',
+ y : relativeTimeWithSingular,
yy : relativeTimeWithPlural
},
ordinalParse: /\d{1,2}\./,
diff --git a/www/lib/moment/src/locale/me.js b/www/lib/moment/src/locale/me.js
new file mode 100644
index 00000000..2c356dab
--- /dev/null
+++ b/www/lib/moment/src/locale/me.js
@@ -0,0 +1,99 @@
+//! moment.js locale configuration
+//! locale : Montenegrin (me)
+//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
+
+import moment from '../moment';
+
+var translator = {
+ words: { //Different grammatical cases
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ dd: ['dan', 'dana', 'dana'],
+ MM: ['mjesec', 'mjeseca', 'mjeseci'],
+ yy: ['godina', 'godine', 'godina']
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
+ },
+ translate: function (number, withoutSuffix, key) {
+ var wordKey = translator.words[key];
+ if (key.length === 1) {
+ return withoutSuffix ? wordKey[0] : wordKey[1];
+ } else {
+ return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
+ }
+ }
+};
+
+export default moment.defineLocale('me', {
+ months: ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'],
+ monthsShort: ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'],
+ weekdays: ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'],
+ weekdaysShort: ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'],
+ weekdaysMin: ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'],
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS : 'LT:ss',
+ L: 'DD. MM. YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY LT',
+ LLLL: 'dddd, D. MMMM YYYY LT'
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sjutra u] LT',
+
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay : '[juče u] LT',
+ lastWeek : function () {
+ var lastWeekDays = [
+ '[prošle] [nedjelje] [u] LT',
+ '[prošlog] [ponedjeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srijede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT'
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse : 'L'
+ },
+ relativeTime : {
+ future : 'za %s',
+ past : 'prije %s',
+ s : 'nekoliko sekundi',
+ m : translator.translate,
+ mm : translator.translate,
+ h : translator.translate,
+ hh : translator.translate,
+ d : 'dan',
+ dd : translator.translate,
+ M : 'mjesec',
+ MM : translator.translate,
+ y : 'godinu',
+ yy : translator.translate
+ },
+ ordinalParse: /\d{1,2}\./,
+ ordinal : '%d.',
+ week : {
+ dow : 1, // Monday is the first day of the week.
+ doy : 7 // The week that contains Jan 1st is the first week of the year.
+ }
+});
diff --git a/www/lib/moment/src/locale/my.js b/www/lib/moment/src/locale/my.js
index 20d76dac..54af1400 100644
--- a/www/lib/moment/src/locale/my.js
+++ b/www/lib/moment/src/locale/my.js
@@ -32,8 +32,9 @@ export default moment.defineLocale('my', {
months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),
monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),
- weekdaysShort: 'နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
- weekdaysMin: 'နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+ weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+ weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
diff --git a/www/lib/moment/src/locale/pl.js b/www/lib/moment/src/locale/pl.js
index a50011f4..e458ea5a 100644
--- a/www/lib/moment/src/locale/pl.js
+++ b/www/lib/moment/src/locale/pl.js
@@ -29,7 +29,12 @@ function translate(number, withoutSuffix, key) {
export default moment.defineLocale('pl', {
months : function (momentToFormat, format) {
- if (/D MMMM/.test(format)) {
+ 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 {
return monthsNominative[momentToFormat.month()];
@@ -88,4 +93,3 @@ export default moment.defineLocale('pl', {
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-
diff --git a/www/lib/moment/src/locale/pt-br.js b/www/lib/moment/src/locale/pt-br.js
index f57cfeb4..e08e8470 100644
--- a/www/lib/moment/src/locale/pt-br.js
+++ b/www/lib/moment/src/locale/pt-br.js
@@ -5,11 +5,11 @@
import moment from '../moment';
export default moment.defineLocale('pt-br', {
- months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
- 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('_'),
- weekdaysShort : 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
- weekdaysMin : 'dom_2ª_3ª_4ª_5ª_6ª_sáb'.split('_'),
+ months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
+ 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('_'),
+ weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
+ weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'LT:ss',
diff --git a/www/lib/moment/src/locale/pt.js b/www/lib/moment/src/locale/pt.js
index 3cd97b74..71e37c69 100644
--- a/www/lib/moment/src/locale/pt.js
+++ b/www/lib/moment/src/locale/pt.js
@@ -5,11 +5,11 @@
import moment from '../moment';
export default moment.defineLocale('pt', {
- months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
- 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('_'),
- weekdaysShort : 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
- weekdaysMin : 'dom_2ª_3ª_4ª_5ª_6ª_sáb'.split('_'),
+ months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
+ 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('_'),
+ weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
+ weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'LT:ss',
diff --git a/www/lib/moment/src/locale/si.js b/www/lib/moment/src/locale/si.js
new file mode 100644
index 00000000..0f03b636
--- /dev/null
+++ b/www/lib/moment/src/locale/si.js
@@ -0,0 +1,56 @@
+//! moment.js locale configuration
+//! locale : Sinhalese (si)
+//! author : Sampath Sitinamaluwa : https://github.com/sampathsris
+
+import moment from '../moment';
+
+/*jshint -W100*/
+export default moment.defineLocale('si', {
+ months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),
+ monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),
+ weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),
+ weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),
+ weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),
+ longDateFormat : {
+ LT : 'a h:mm',
+ LTS : 'a h:mm:ss',
+ L : 'YYYY/MM/DD',
+ LL : 'YYYY MMMM D',
+ LLL : 'YYYY MMMM D, LT',
+ LLLL : 'YYYY MMMM D [වැනි] dddd, LTS'
+ },
+ calendar : {
+ sameDay : '[අද] LT[ට]',
+ nextDay : '[හෙට] LT[ට]',
+ nextWeek : 'dddd LT[ට]',
+ lastDay : '[ඊයේ] LT[ට]',
+ lastWeek : '[පසුගිය] dddd LT[ට]',
+ sameElse : 'L'
+ },
+ relativeTime : {
+ future : '%sකින්',
+ past : '%sකට පෙර',
+ s : 'තත්පර කිහිපය',
+ m : 'මිනිත්තුව',
+ mm : 'මිනිත්තු %d',
+ h : 'පැය',
+ hh : 'පැය %d',
+ d : 'දිනය',
+ dd : 'දින %d',
+ M : 'මාසය',
+ MM : 'මාස %d',
+ y : 'වසර',
+ yy : 'වසර %d'
+ },
+ ordinalParse: /\d{1,2} වැනි/,
+ ordinal : function (number) {
+ return number + ' වැනි';
+ },
+ meridiem : function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'ප.ව.' : 'පස් වරු';
+ } else {
+ return isLower ? 'පෙ.ව.' : 'පෙර වරු';
+ }
+ }
+});
diff --git a/www/lib/moment/src/locale/sl.js b/www/lib/moment/src/locale/sl.js
index a4b486de..e5723389 100644
--- a/www/lib/moment/src/locale/sl.js
+++ b/www/lib/moment/src/locale/sl.js
@@ -4,62 +4,72 @@
import moment from '../moment';
-function translate(number, withoutSuffix, key) {
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
switch (key) {
+ case 's':
+ return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
case 'm':
return withoutSuffix ? 'ena minuta' : 'eno minuto';
case 'mm':
if (number === 1) {
- result += 'minuta';
+ result += withoutSuffix ? 'minuta' : 'minuto';
} else if (number === 2) {
- result += 'minuti';
- } else if (number === 3 || number === 4) {
- result += 'minute';
+ result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'minute' : 'minutami';
} else {
- result += 'minut';
+ result += withoutSuffix || isFuture ? 'minut' : 'minutami';
}
return result;
case 'h':
return withoutSuffix ? 'ena ura' : 'eno uro';
case 'hh':
if (number === 1) {
- result += 'ura';
+ result += withoutSuffix ? 'ura' : 'uro';
} else if (number === 2) {
- result += 'uri';
- } else if (number === 3 || number === 4) {
- result += 'ure';
+ result += withoutSuffix || isFuture ? 'uri' : 'urama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'ure' : 'urami';
} else {
- result += 'ur';
+ result += withoutSuffix || isFuture ? 'ur' : 'urami';
}
return result;
+ case 'd':
+ return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
case 'dd':
if (number === 1) {
- result += 'dan';
+ result += withoutSuffix || isFuture ? 'dan' : 'dnem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
} else {
- result += 'dni';
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
}
return result;
+ case 'M':
+ return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
case 'MM':
if (number === 1) {
- result += 'mesec';
+ result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
} else if (number === 2) {
- result += 'meseca';
- } else if (number === 3 || number === 4) {
- result += 'mesece';
+ result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
} else {
- result += 'mesecev';
+ result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
}
return result;
+ case 'y':
+ return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
case 'yy':
if (number === 1) {
- result += 'leto';
+ result += withoutSuffix || isFuture ? 'leto' : 'letom';
} else if (number === 2) {
- result += 'leti';
- } else if (number === 3 || number === 4) {
- result += 'leta';
+ result += withoutSuffix || isFuture ? 'leti' : 'letoma';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'leta' : 'leti';
} else {
- result += 'let';
+ result += withoutSuffix || isFuture ? 'let' : 'leti';
}
return result;
}
@@ -82,6 +92,7 @@ export default moment.defineLocale('sl', {
calendar : {
sameDay : '[danes ob] LT',
nextDay : '[jutri ob] LT',
+
nextWeek : function () {
switch (this.day()) {
case 0:
@@ -101,9 +112,11 @@ export default moment.defineLocale('sl', {
lastWeek : function () {
switch (this.day()) {
case 0:
+ return '[prejšnjo] [nedeljo] [ob] LT';
case 3:
+ return '[prejšnjo] [sredo] [ob] LT';
case 6:
- return '[prejšnja] dddd [ob] LT';
+ return '[prejšnjo] [soboto] [ob] LT';
case 1:
case 2:
case 4:
@@ -115,18 +128,18 @@ export default moment.defineLocale('sl', {
},
relativeTime : {
future : 'čez %s',
- past : '%s nazaj',
- s : 'nekaj sekund',
- m : translate,
- mm : translate,
- h : translate,
- hh : translate,
- d : 'en dan',
- dd : translate,
- M : 'en mesec',
- MM : translate,
- y : 'eno leto',
- yy : translate
+ past : 'pred %s',
+ s : processRelativeTime,
+ m : processRelativeTime,
+ mm : processRelativeTime,
+ h : processRelativeTime,
+ hh : processRelativeTime,
+ d : processRelativeTime,
+ dd : processRelativeTime,
+ M : processRelativeTime,
+ MM : processRelativeTime,
+ y : processRelativeTime,
+ yy : processRelativeTime
},
ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
@@ -135,4 +148,3 @@ export default moment.defineLocale('sl', {
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-
diff --git a/www/lib/moment/src/locale/sv.js b/www/lib/moment/src/locale/sv.js
index bec21e94..6fc1c268 100644
--- a/www/lib/moment/src/locale/sv.js
+++ b/www/lib/moment/src/locale/sv.js
@@ -22,8 +22,8 @@ export default moment.defineLocale('sv', {
sameDay: '[Idag] LT',
nextDay: '[Imorgon] LT',
lastDay: '[Igår] LT',
- nextWeek: 'dddd LT',
- lastWeek: '[Förra] dddd[en] LT',
+ nextWeek: '[På] dddd LT',
+ lastWeek: '[I] dddd[s] LT',
sameElse: 'L'
},
relativeTime : {
diff --git a/www/lib/moment/src/locale/zh-cn.js b/www/lib/moment/src/locale/zh-cn.js
index 3dcea9da..dfc0d049 100644
--- a/www/lib/moment/src/locale/zh-cn.js
+++ b/www/lib/moment/src/locale/zh-cn.js
@@ -12,7 +12,7 @@ export default moment.defineLocale('zh-cn', {
weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
longDateFormat : {
- LT : 'Ah点mm',
+ LT : 'Ah点mm分',
LTS : 'Ah点m分s秒',
L : 'YYYY-MM-DD',
LL : 'YYYY年MMMD日',
@@ -98,16 +98,16 @@ export default moment.defineLocale('zh-cn', {
future : '%s内',
past : '%s前',
s : '几秒',
- m : '1分钟',
- mm : '%d分钟',
- h : '1小时',
- hh : '%d小时',
- d : '1天',
- dd : '%d天',
- M : '1个月',
- MM : '%d个月',
- y : '1年',
- yy : '%d年'
+ m : '1 分钟',
+ mm : '%d 分钟',
+ h : '1 小时',
+ hh : '%d 小时',
+ d : '1 天',
+ dd : '%d 天',
+ M : '1 个月',
+ MM : '%d 个月',
+ y : '1 年',
+ yy : '%d 年'
},
week : {
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
diff --git a/www/lib/moment/src/locale/zh-tw.js b/www/lib/moment/src/locale/zh-tw.js
index 2f2c0432..918700ae 100644
--- a/www/lib/moment/src/locale/zh-tw.js
+++ b/www/lib/moment/src/locale/zh-tw.js
@@ -11,7 +11,7 @@ export default moment.defineLocale('zh-tw', {
weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
longDateFormat : {
- LT : 'Ah點mm',
+ LT : 'Ah點mm分',
LTS : 'Ah點m分s秒',
L : 'YYYY年MMMD日',
LL : 'YYYY年MMMD日',
@@ -89,4 +89,3 @@ export default moment.defineLocale('zh-tw', {
yy : '%d年'
}
});
-
diff --git a/www/lib/moment/src/moment.js b/www/lib/moment/src/moment.js
index c315d1d3..4407eb97 100644
--- a/www/lib/moment/src/moment.js
+++ b/www/lib/moment/src/moment.js
@@ -1,12 +1,12 @@
//! moment.js
-//! version : 2.10.2
+//! version : 2.10.3
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
import { hooks as moment, setHookCallback } from './lib/utils/hooks';
-moment.version = '2.10.2';
+moment.version = '2.10.3';
import {
min,