momentjs-rails 2.6.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/news.md +3 -0
- data/vendor/assets/javascripts/moment.js +184 -63
- data/vendor/assets/javascripts/moment/ar-sa.js +96 -0
- data/vendor/assets/javascripts/moment/ar.js +42 -1
- data/vendor/assets/javascripts/moment/az.js +102 -0
- data/vendor/assets/javascripts/moment/bn.js +106 -0
- data/vendor/assets/javascripts/moment/cy.js +1 -1
- data/vendor/assets/javascripts/moment/da.js +3 -3
- data/vendor/assets/javascripts/moment/de-at.js +72 -0
- data/vendor/assets/javascripts/moment/el.js +12 -1
- data/vendor/assets/javascripts/moment/it.js +2 -2
- data/vendor/assets/javascripts/moment/lt.js +2 -2
- data/vendor/assets/javascripts/moment/pt.js +1 -1
- data/vendor/assets/javascripts/moment/ru.js +4 -1
- data/vendor/assets/javascripts/moment/sr-cyrl.js +106 -0
- data/vendor/assets/javascripts/moment/tzm-latn.js +55 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ebd1de8ebaf16234de4066959689ed14457b0f6
|
4
|
+
data.tar.gz: 2b64b2b657ae712cae91470d6f144cdced41914f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5990cdc4cd0195af98b7c2d29e66b464305fcb30f8a72c836509cbee35e40ef660b817a3b410490d28d6193c9e9c0ac78d79df0aabdfec21e1da91e07712f16c
|
7
|
+
data.tar.gz: deea01a7ae4423921f9259523283514bf2e29ec64702e56668fabf51fc0037b4331475fbfd96481a7b2f22e19753def05c244669d27976efaf4d218d5e78c446
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ If you want to include a localization file, also add the following directive:
|
|
24
24
|
|
25
25
|
## Versioning
|
26
26
|
|
27
|
-
momentjs-rails 2.
|
27
|
+
momentjs-rails 2.7.0 == Moment.js 2.7.0
|
28
28
|
|
29
29
|
Every attempt is made to mirror the currently shipping Momentum.js version number wherever possible.
|
30
30
|
The major, minor, and patch version numbers will always represent the Momentum.js version. Should a gem
|
data/news.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
//! moment.js
|
2
|
-
//! version : 2.
|
2
|
+
//! version : 2.7.0
|
3
3
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
4
4
|
//! license : MIT
|
5
5
|
//! momentjs.com
|
@@ -11,7 +11,7 @@
|
|
11
11
|
************************************/
|
12
12
|
|
13
13
|
var moment,
|
14
|
-
VERSION = "2.
|
14
|
+
VERSION = "2.7.0",
|
15
15
|
// the global-scope this is NOT the global object in Node.js
|
16
16
|
globalScope = typeof global !== 'undefined' ? global : this,
|
17
17
|
oldGlobalMoment,
|
@@ -36,6 +36,7 @@
|
|
36
36
|
_f : null,
|
37
37
|
_l : null,
|
38
38
|
_strict : null,
|
39
|
+
_tzm : null,
|
39
40
|
_isUTC : null,
|
40
41
|
_offset : null, // optional. Combine with _isUTC
|
41
42
|
_pf : null,
|
@@ -144,6 +145,16 @@
|
|
144
145
|
// format function strings
|
145
146
|
formatFunctions = {},
|
146
147
|
|
148
|
+
// default relative time thresholds
|
149
|
+
relativeTimeThresholds = {
|
150
|
+
s: 45, //seconds to minutes
|
151
|
+
m: 45, //minutes to hours
|
152
|
+
h: 22, //hours to days
|
153
|
+
dd: 25, //days to month (month == 1)
|
154
|
+
dm: 45, //days to months (months > 1)
|
155
|
+
dy: 345 //days to year
|
156
|
+
},
|
157
|
+
|
147
158
|
// tokens to ordinalize and pad
|
148
159
|
ordinalizeTokens = 'DDD w W M D d'.split(' '),
|
149
160
|
paddedTokens = 'M D H h m s w W'.split(' '),
|
@@ -283,6 +294,16 @@
|
|
283
294
|
|
284
295
|
lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'];
|
285
296
|
|
297
|
+
// Pick the first defined of two or three arguments. dfl comes from
|
298
|
+
// default.
|
299
|
+
function dfl(a, b, c) {
|
300
|
+
switch (arguments.length) {
|
301
|
+
case 2: return a != null ? a : b;
|
302
|
+
case 3: return a != null ? a : b != null ? b : c;
|
303
|
+
default: throw new Error("Implement me");
|
304
|
+
}
|
305
|
+
}
|
306
|
+
|
286
307
|
function defaultParsingFlags() {
|
287
308
|
// We need to deep clone this object, and es5 standard is not very
|
288
309
|
// helpful.
|
@@ -1151,39 +1172,94 @@
|
|
1151
1172
|
config._useUTC = true;
|
1152
1173
|
config._tzm = timezoneMinutesFromString(input);
|
1153
1174
|
break;
|
1175
|
+
// WEEKDAY - human
|
1176
|
+
case 'dd':
|
1177
|
+
case 'ddd':
|
1178
|
+
case 'dddd':
|
1179
|
+
a = getLangDefinition(config._l).weekdaysParse(input);
|
1180
|
+
// if we didn't get a weekday name, mark the date as invalid
|
1181
|
+
if (a != null) {
|
1182
|
+
config._w = config._w || {};
|
1183
|
+
config._w['d'] = a;
|
1184
|
+
} else {
|
1185
|
+
config._pf.invalidWeekday = input;
|
1186
|
+
}
|
1187
|
+
break;
|
1188
|
+
// WEEK, WEEK DAY - numeric
|
1154
1189
|
case 'w':
|
1155
1190
|
case 'ww':
|
1156
1191
|
case 'W':
|
1157
1192
|
case 'WW':
|
1158
1193
|
case 'd':
|
1159
|
-
case 'dd':
|
1160
|
-
case 'ddd':
|
1161
|
-
case 'dddd':
|
1162
1194
|
case 'e':
|
1163
1195
|
case 'E':
|
1164
1196
|
token = token.substr(0, 1);
|
1165
1197
|
/* falls through */
|
1166
|
-
case 'gg':
|
1167
1198
|
case 'gggg':
|
1168
|
-
case 'GG':
|
1169
1199
|
case 'GGGG':
|
1170
1200
|
case 'GGGGG':
|
1171
1201
|
token = token.substr(0, 2);
|
1172
1202
|
if (input) {
|
1173
1203
|
config._w = config._w || {};
|
1174
|
-
config._w[token] = input;
|
1204
|
+
config._w[token] = toInt(input);
|
1175
1205
|
}
|
1176
1206
|
break;
|
1207
|
+
case 'gg':
|
1208
|
+
case 'GG':
|
1209
|
+
config._w = config._w || {};
|
1210
|
+
config._w[token] = moment.parseTwoDigitYear(input);
|
1177
1211
|
}
|
1178
1212
|
}
|
1179
1213
|
|
1214
|
+
function dayOfYearFromWeekInfo(config) {
|
1215
|
+
var w, weekYear, week, weekday, dow, doy, temp, lang;
|
1216
|
+
|
1217
|
+
w = config._w;
|
1218
|
+
if (w.GG != null || w.W != null || w.E != null) {
|
1219
|
+
dow = 1;
|
1220
|
+
doy = 4;
|
1221
|
+
|
1222
|
+
// TODO: We need to take the current isoWeekYear, but that depends on
|
1223
|
+
// how we interpret now (local, utc, fixed offset). So create
|
1224
|
+
// a now version of current config (take local/utc/offset flags, and
|
1225
|
+
// create now).
|
1226
|
+
weekYear = dfl(w.GG, config._a[YEAR], weekOfYear(moment(), 1, 4).year);
|
1227
|
+
week = dfl(w.W, 1);
|
1228
|
+
weekday = dfl(w.E, 1);
|
1229
|
+
} else {
|
1230
|
+
lang = getLangDefinition(config._l);
|
1231
|
+
dow = lang._week.dow;
|
1232
|
+
doy = lang._week.doy;
|
1233
|
+
|
1234
|
+
weekYear = dfl(w.gg, config._a[YEAR], weekOfYear(moment(), dow, doy).year);
|
1235
|
+
week = dfl(w.w, 1);
|
1236
|
+
|
1237
|
+
if (w.d != null) {
|
1238
|
+
// weekday -- low day numbers are considered next week
|
1239
|
+
weekday = w.d;
|
1240
|
+
if (weekday < dow) {
|
1241
|
+
++week;
|
1242
|
+
}
|
1243
|
+
} else if (w.e != null) {
|
1244
|
+
// local weekday -- counting starts from begining of week
|
1245
|
+
weekday = w.e + dow;
|
1246
|
+
} else {
|
1247
|
+
// default to begining of week
|
1248
|
+
weekday = dow;
|
1249
|
+
}
|
1250
|
+
}
|
1251
|
+
temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow);
|
1252
|
+
|
1253
|
+
config._a[YEAR] = temp.year;
|
1254
|
+
config._dayOfYear = temp.dayOfYear;
|
1255
|
+
}
|
1256
|
+
|
1180
1257
|
// convert an array to a date.
|
1181
1258
|
// the array should mirror the parameters below
|
1182
1259
|
// note: all values past the year are optional and will default to the lowest possible value.
|
1183
1260
|
// [year, month, day , hour, minute, second, millisecond]
|
1184
1261
|
function dateFromConfig(config) {
|
1185
|
-
var i, date, input = [], currentDate,
|
1186
|
-
yearToUse, fixYear, w, temp, lang, weekday, week;
|
1262
|
+
var i, date, input = [], currentDate, yearToUse;
|
1187
1263
|
|
1188
1264
|
if (config._d) {
|
1189
1265
|
return;
|
@@ -1193,39 +1269,12 @@
|
|
1193
1269
|
|
1194
1270
|
//compute day of the year from weeks and weekdays
|
1195
1271
|
if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
|
1196
|
-
|
1197
|
-
var intVal = parseInt(val, 10);
|
1198
|
-
return val ?
|
1199
|
-
(val.length < 3 ? (intVal > 68 ? 1900 + intVal : 2000 + intVal) : intVal) :
|
1200
|
-
(config._a[YEAR] == null ? moment().weekYear() : config._a[YEAR]);
|
1201
|
-
};
|
1202
|
-
|
1203
|
-
w = config._w;
|
1204
|
-
if (w.GG != null || w.W != null || w.E != null) {
|
1205
|
-
temp = dayOfYearFromWeeks(fixYear(w.GG), w.W || 1, w.E, 4, 1);
|
1206
|
-
}
|
1207
|
-
else {
|
1208
|
-
lang = getLangDefinition(config._l);
|
1209
|
-
weekday = w.d != null ? parseWeekday(w.d, lang) :
|
1210
|
-
(w.e != null ? parseInt(w.e, 10) + lang._week.dow : 0);
|
1211
|
-
|
1212
|
-
week = parseInt(w.w, 10) || 1;
|
1213
|
-
|
1214
|
-
//if we're parsing 'd', then the low day numbers may be next week
|
1215
|
-
if (w.d != null && weekday < lang._week.dow) {
|
1216
|
-
week++;
|
1217
|
-
}
|
1218
|
-
|
1219
|
-
temp = dayOfYearFromWeeks(fixYear(w.gg), week, weekday, lang._week.doy, lang._week.dow);
|
1220
|
-
}
|
1221
|
-
|
1222
|
-
config._a[YEAR] = temp.year;
|
1223
|
-
config._dayOfYear = temp.dayOfYear;
|
1272
|
+
dayOfYearFromWeekInfo(config);
|
1224
1273
|
}
|
1225
1274
|
|
1226
1275
|
//if the day of the year is set, figure out what it is
|
1227
1276
|
if (config._dayOfYear) {
|
1228
|
-
yearToUse = config._a[YEAR]
|
1277
|
+
yearToUse = dfl(config._a[YEAR], currentDate[YEAR]);
|
1229
1278
|
|
1230
1279
|
if (config._dayOfYear > daysInYear(yearToUse)) {
|
1231
1280
|
config._pf._overflowDayOfYear = true;
|
@@ -1250,11 +1299,12 @@
|
|
1250
1299
|
config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
|
1251
1300
|
}
|
1252
1301
|
|
1253
|
-
// add the offsets to the time to be parsed so that we can have a clean array for checking isValid
|
1254
|
-
input[HOUR] += toInt((config._tzm || 0) / 60);
|
1255
|
-
input[MINUTE] += toInt((config._tzm || 0) % 60);
|
1256
|
-
|
1257
1302
|
config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input);
|
1303
|
+
// Apply timezone offset from input. The actual zone can be changed
|
1304
|
+
// with parseZone.
|
1305
|
+
if (config._tzm != null) {
|
1306
|
+
config._d.setUTCMinutes(config._d.getUTCMinutes() + config._tzm);
|
1307
|
+
}
|
1258
1308
|
}
|
1259
1309
|
|
1260
1310
|
function dateFromObject(config) {
|
@@ -1294,6 +1344,11 @@
|
|
1294
1344
|
// date from string and format string
|
1295
1345
|
function makeDateFromStringAndFormat(config) {
|
1296
1346
|
|
1347
|
+
if (config._f === moment.ISO_8601) {
|
1348
|
+
parseISO(config);
|
1349
|
+
return;
|
1350
|
+
}
|
1351
|
+
|
1297
1352
|
config._a = [];
|
1298
1353
|
config._pf.empty = true;
|
1299
1354
|
|
@@ -1406,7 +1461,7 @@
|
|
1406
1461
|
}
|
1407
1462
|
|
1408
1463
|
// date from iso format
|
1409
|
-
function
|
1464
|
+
function parseISO(config) {
|
1410
1465
|
var i, l,
|
1411
1466
|
string = config._i,
|
1412
1467
|
match = isoRegex.exec(string);
|
@@ -1430,8 +1485,16 @@
|
|
1430
1485
|
config._f += "Z";
|
1431
1486
|
}
|
1432
1487
|
makeDateFromStringAndFormat(config);
|
1488
|
+
} else {
|
1489
|
+
config._isValid = false;
|
1433
1490
|
}
|
1434
|
-
|
1491
|
+
}
|
1492
|
+
|
1493
|
+
// date from iso format or fallback
|
1494
|
+
function makeDateFromString(config) {
|
1495
|
+
parseISO(config);
|
1496
|
+
if (config._isValid === false) {
|
1497
|
+
delete config._isValid;
|
1435
1498
|
moment.createFromInputFallback(config);
|
1436
1499
|
}
|
1437
1500
|
}
|
@@ -1512,15 +1575,15 @@
|
|
1512
1575
|
hours = round(minutes / 60),
|
1513
1576
|
days = round(hours / 24),
|
1514
1577
|
years = round(days / 365),
|
1515
|
-
args = seconds <
|
1578
|
+
args = seconds < relativeTimeThresholds.s && ['s', seconds] ||
|
1516
1579
|
minutes === 1 && ['m'] ||
|
1517
|
-
minutes <
|
1580
|
+
minutes < relativeTimeThresholds.m && ['mm', minutes] ||
|
1518
1581
|
hours === 1 && ['h'] ||
|
1519
|
-
hours <
|
1582
|
+
hours < relativeTimeThresholds.h && ['hh', hours] ||
|
1520
1583
|
days === 1 && ['d'] ||
|
1521
|
-
days <=
|
1522
|
-
days <=
|
1523
|
-
days <
|
1584
|
+
days <= relativeTimeThresholds.dd && ['dd', days] ||
|
1585
|
+
days <= relativeTimeThresholds.dm && ['M'] ||
|
1586
|
+
days < relativeTimeThresholds.dy && ['MM', round(days / 30)] ||
|
1524
1587
|
years === 1 && ['y'] || ['yy', years];
|
1525
1588
|
args[2] = withoutSuffix;
|
1526
1589
|
args[3] = milliseconds > 0;
|
@@ -1566,6 +1629,7 @@
|
|
1566
1629
|
function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {
|
1567
1630
|
var d = makeUTCDate(year, 0, 1).getUTCDay(), daysToAdd, dayOfYear;
|
1568
1631
|
|
1632
|
+
d = d === 0 ? 7 : d;
|
1569
1633
|
weekday = weekday != null ? weekday : firstDayOfWeek;
|
1570
1634
|
daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0);
|
1571
1635
|
dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1;
|
@@ -1641,6 +1705,40 @@
|
|
1641
1705
|
config._d = new Date(config._i);
|
1642
1706
|
});
|
1643
1707
|
|
1708
|
+
// Pick a moment m from moments so that m[fn](other) is true for all
|
1709
|
+
// other. This relies on the function fn to be transitive.
|
1710
|
+
//
|
1711
|
+
// moments should either be an array of moment objects or an array, whose
|
1712
|
+
// first element is an array of moment objects.
|
1713
|
+
function pickBy(fn, moments) {
|
1714
|
+
var res, i;
|
1715
|
+
if (moments.length === 1 && isArray(moments[0])) {
|
1716
|
+
moments = moments[0];
|
1717
|
+
}
|
1718
|
+
if (!moments.length) {
|
1719
|
+
return moment();
|
1720
|
+
}
|
1721
|
+
res = moments[0];
|
1722
|
+
for (i = 1; i < moments.length; ++i) {
|
1723
|
+
if (moments[i][fn](res)) {
|
1724
|
+
res = moments[i];
|
1725
|
+
}
|
1726
|
+
}
|
1727
|
+
return res;
|
1728
|
+
}
|
1729
|
+
|
1730
|
+
moment.min = function () {
|
1731
|
+
var args = [].slice.call(arguments, 0);
|
1732
|
+
|
1733
|
+
return pickBy('isBefore', args);
|
1734
|
+
};
|
1735
|
+
|
1736
|
+
moment.max = function () {
|
1737
|
+
var args = [].slice.call(arguments, 0);
|
1738
|
+
|
1739
|
+
return pickBy('isAfter', args);
|
1740
|
+
};
|
1741
|
+
|
1644
1742
|
// creating with utc
|
1645
1743
|
moment.utc = function (input, format, lang, strict) {
|
1646
1744
|
var c;
|
@@ -1737,6 +1835,9 @@
|
|
1737
1835
|
// default format
|
1738
1836
|
moment.defaultFormat = isoFormat;
|
1739
1837
|
|
1838
|
+
// constant that refers to the ISO standard
|
1839
|
+
moment.ISO_8601 = function () {};
|
1840
|
+
|
1740
1841
|
// Plugins that add properties should also add the key here (null value),
|
1741
1842
|
// so we can properly clone ourselves.
|
1742
1843
|
moment.momentProperties = momentProperties;
|
@@ -1745,6 +1846,15 @@
|
|
1745
1846
|
// It is intended to keep the offset in sync with the timezone.
|
1746
1847
|
moment.updateOffset = function () {};
|
1747
1848
|
|
1849
|
+
// This function allows you to set a threshold for relative time strings
|
1850
|
+
moment.relativeTimeThreshold = function(threshold, limit) {
|
1851
|
+
if (relativeTimeThresholds[threshold] === undefined) {
|
1852
|
+
return false;
|
1853
|
+
}
|
1854
|
+
relativeTimeThresholds[threshold] = limit;
|
1855
|
+
return true;
|
1856
|
+
};
|
1857
|
+
|
1748
1858
|
// This function will load languages and then set the global language. If
|
1749
1859
|
// no arguments are passed in, it will simply return the current global
|
1750
1860
|
// language key.
|
@@ -1900,7 +2010,9 @@
|
|
1900
2010
|
add : function (input, val) {
|
1901
2011
|
var dur;
|
1902
2012
|
// switch args to support add('s', 1) and add(1, 's')
|
1903
|
-
if (typeof input === 'string') {
|
2013
|
+
if (typeof input === 'string' && typeof val === 'string') {
|
2014
|
+
dur = moment.duration(isNaN(+val) ? +input : +val, isNaN(+val) ? val : input);
|
2015
|
+
} else if (typeof input === 'string') {
|
1904
2016
|
dur = moment.duration(+val, input);
|
1905
2017
|
} else {
|
1906
2018
|
dur = moment.duration(input, val);
|
@@ -1912,7 +2024,9 @@
|
|
1912
2024
|
subtract : function (input, val) {
|
1913
2025
|
var dur;
|
1914
2026
|
// switch args to support subtract('s', 1) and subtract(1, 's')
|
1915
|
-
if (typeof input === 'string') {
|
2027
|
+
if (typeof input === 'string' && typeof val === 'string') {
|
2028
|
+
dur = moment.duration(isNaN(+val) ? +input : +val, isNaN(+val) ? val : input);
|
2029
|
+
} else if (typeof input === 'string') {
|
1916
2030
|
dur = moment.duration(+val, input);
|
1917
2031
|
} else {
|
1918
2032
|
dur = moment.duration(input, val);
|
@@ -1963,10 +2077,11 @@
|
|
1963
2077
|
return this.from(moment(), withoutSuffix);
|
1964
2078
|
},
|
1965
2079
|
|
1966
|
-
calendar : function () {
|
2080
|
+
calendar : function (time) {
|
1967
2081
|
// We want to compare the start of today, vs this.
|
1968
2082
|
// Getting start-of-today depends on whether we're zone'd or not.
|
1969
|
-
var
|
2083
|
+
var now = time || moment(),
|
2084
|
+
sod = makeAs(now, this).startOf('day'),
|
1970
2085
|
diff = this.diff(sod, 'days', true),
|
1971
2086
|
format = diff < -6 ? 'sameElse' :
|
1972
2087
|
diff < -1 ? 'lastWeek' :
|
@@ -2061,15 +2176,21 @@
|
|
2061
2176
|
return +this.clone().startOf(units) === +makeAs(input, this).startOf(units);
|
2062
2177
|
},
|
2063
2178
|
|
2064
|
-
min:
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2179
|
+
min: deprecate(
|
2180
|
+
"moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",
|
2181
|
+
function (other) {
|
2182
|
+
other = moment.apply(null, arguments);
|
2183
|
+
return other < this ? this : other;
|
2184
|
+
}
|
2185
|
+
),
|
2068
2186
|
|
2069
|
-
max:
|
2070
|
-
|
2071
|
-
|
2072
|
-
|
2187
|
+
max: deprecate(
|
2188
|
+
"moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",
|
2189
|
+
function (other) {
|
2190
|
+
other = moment.apply(null, arguments);
|
2191
|
+
return other > this ? this : other;
|
2192
|
+
}
|
2193
|
+
),
|
2073
2194
|
|
2074
2195
|
// keepTime = true means only change the timezone, without affecting
|
2075
2196
|
// the local hour. So 5:31:26 +0300 --[zone(2, true)]--> 5:31:26 +0200
|
@@ -0,0 +1,96 @@
|
|
1
|
+
// moment.js language configuration
|
2
|
+
// language : Arabic Saudi Arabia (ar-sa)
|
3
|
+
// author : Suhail Alkowaileet : https://github.com/xsoh
|
4
|
+
|
5
|
+
(function (factory) {
|
6
|
+
if (typeof define === 'function' && define.amd) {
|
7
|
+
define(['moment'], factory); // AMD
|
8
|
+
} else if (typeof exports === 'object') {
|
9
|
+
module.exports = factory(require('../moment')); // Node
|
10
|
+
} else {
|
11
|
+
factory(window.moment); // Browser global
|
12
|
+
}
|
13
|
+
}(function (moment) {
|
14
|
+
var symbolMap = {
|
15
|
+
'1': '١',
|
16
|
+
'2': '٢',
|
17
|
+
'3': '٣',
|
18
|
+
'4': '٤',
|
19
|
+
'5': '٥',
|
20
|
+
'6': '٦',
|
21
|
+
'7': '٧',
|
22
|
+
'8': '٨',
|
23
|
+
'9': '٩',
|
24
|
+
'0': '٠'
|
25
|
+
}, numberMap = {
|
26
|
+
'١': '1',
|
27
|
+
'٢': '2',
|
28
|
+
'٣': '3',
|
29
|
+
'٤': '4',
|
30
|
+
'٥': '5',
|
31
|
+
'٦': '6',
|
32
|
+
'٧': '7',
|
33
|
+
'٨': '8',
|
34
|
+
'٩': '9',
|
35
|
+
'٠': '0'
|
36
|
+
};
|
37
|
+
|
38
|
+
return moment.lang('ar-sa', {
|
39
|
+
months : "يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),
|
40
|
+
monthsShort : "يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),
|
41
|
+
weekdays : "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
|
42
|
+
weekdaysShort : "أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),
|
43
|
+
weekdaysMin : "ح_ن_ث_ر_خ_ج_س".split("_"),
|
44
|
+
longDateFormat : {
|
45
|
+
LT : "HH:mm",
|
46
|
+
L : "DD/MM/YYYY",
|
47
|
+
LL : "D MMMM YYYY",
|
48
|
+
LLL : "D MMMM YYYY LT",
|
49
|
+
LLLL : "dddd D MMMM YYYY LT"
|
50
|
+
},
|
51
|
+
meridiem : function (hour, minute, isLower) {
|
52
|
+
if (hour < 12) {
|
53
|
+
return "ص";
|
54
|
+
} else {
|
55
|
+
return "م";
|
56
|
+
}
|
57
|
+
},
|
58
|
+
calendar : {
|
59
|
+
sameDay: "[اليوم على الساعة] LT",
|
60
|
+
nextDay: '[غدا على الساعة] LT',
|
61
|
+
nextWeek: 'dddd [على الساعة] LT',
|
62
|
+
lastDay: '[أمس على الساعة] LT',
|
63
|
+
lastWeek: 'dddd [على الساعة] LT',
|
64
|
+
sameElse: 'L'
|
65
|
+
},
|
66
|
+
relativeTime : {
|
67
|
+
future : "في %s",
|
68
|
+
past : "منذ %s",
|
69
|
+
s : "ثوان",
|
70
|
+
m : "دقيقة",
|
71
|
+
mm : "%d دقائق",
|
72
|
+
h : "ساعة",
|
73
|
+
hh : "%d ساعات",
|
74
|
+
d : "يوم",
|
75
|
+
dd : "%d أيام",
|
76
|
+
M : "شهر",
|
77
|
+
MM : "%d أشهر",
|
78
|
+
y : "سنة",
|
79
|
+
yy : "%d سنوات"
|
80
|
+
},
|
81
|
+
preparse: function (string) {
|
82
|
+
return string.replace(/[۰-۹]/g, function (match) {
|
83
|
+
return numberMap[match];
|
84
|
+
}).replace(/،/g, ',');
|
85
|
+
},
|
86
|
+
postformat: function (string) {
|
87
|
+
return string.replace(/\d/g, function (match) {
|
88
|
+
return symbolMap[match];
|
89
|
+
}).replace(/,/g, '،');
|
90
|
+
},
|
91
|
+
week : {
|
92
|
+
dow : 6, // Saturday is the first day of the week.
|
93
|
+
doy : 12 // The week that contains Jan 1st is the first week of the year.
|
94
|
+
}
|
95
|
+
});
|
96
|
+
}));
|
@@ -12,11 +12,35 @@
|
|
12
12
|
factory(window.moment); // Browser global
|
13
13
|
}
|
14
14
|
}(function (moment) {
|
15
|
+
var symbolMap = {
|
16
|
+
'1': '١',
|
17
|
+
'2': '٢',
|
18
|
+
'3': '٣',
|
19
|
+
'4': '٤',
|
20
|
+
'5': '٥',
|
21
|
+
'6': '٦',
|
22
|
+
'7': '٧',
|
23
|
+
'8': '٨',
|
24
|
+
'9': '٩',
|
25
|
+
'0': '٠'
|
26
|
+
}, numberMap = {
|
27
|
+
'١': '1',
|
28
|
+
'٢': '2',
|
29
|
+
'٣': '3',
|
30
|
+
'٤': '4',
|
31
|
+
'٥': '5',
|
32
|
+
'٦': '6',
|
33
|
+
'٧': '7',
|
34
|
+
'٨': '8',
|
35
|
+
'٩': '9',
|
36
|
+
'٠': '0'
|
37
|
+
};
|
38
|
+
|
15
39
|
return moment.lang('ar', {
|
16
40
|
months : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),
|
17
41
|
monthsShort : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),
|
18
42
|
weekdays : "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
|
19
|
-
weekdaysShort : "
|
43
|
+
weekdaysShort : "أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),
|
20
44
|
weekdaysMin : "ح_ن_ث_ر_خ_ج_س".split("_"),
|
21
45
|
longDateFormat : {
|
22
46
|
LT : "HH:mm",
|
@@ -25,6 +49,13 @@
|
|
25
49
|
LLL : "D MMMM YYYY LT",
|
26
50
|
LLLL : "dddd D MMMM YYYY LT"
|
27
51
|
},
|
52
|
+
meridiem : function (hour, minute, isLower) {
|
53
|
+
if (hour < 12) {
|
54
|
+
return "ص";
|
55
|
+
} else {
|
56
|
+
return "م";
|
57
|
+
}
|
58
|
+
},
|
28
59
|
calendar : {
|
29
60
|
sameDay: "[اليوم على الساعة] LT",
|
30
61
|
nextDay: '[غدا على الساعة] LT',
|
@@ -48,6 +79,16 @@
|
|
48
79
|
y : "سنة",
|
49
80
|
yy : "%d سنوات"
|
50
81
|
},
|
82
|
+
preparse: function (string) {
|
83
|
+
return string.replace(/[۰-۹]/g, function (match) {
|
84
|
+
return numberMap[match];
|
85
|
+
}).replace(/،/g, ',');
|
86
|
+
},
|
87
|
+
postformat: function (string) {
|
88
|
+
return string.replace(/\d/g, function (match) {
|
89
|
+
return symbolMap[match];
|
90
|
+
}).replace(/,/g, '،');
|
91
|
+
},
|
51
92
|
week : {
|
52
93
|
dow : 6, // Saturday is the first day of the week.
|
53
94
|
doy : 12 // The week that contains Jan 1st is the first week of the year.
|
@@ -0,0 +1,102 @@
|
|
1
|
+
// moment.js language configuration
|
2
|
+
// language : azerbaijani (az)
|
3
|
+
// author : topchiyev : https://github.com/topchiyev
|
4
|
+
|
5
|
+
(function (factory) {
|
6
|
+
if (typeof define === 'function' && define.amd) {
|
7
|
+
define(['moment'], factory); // AMD
|
8
|
+
} else if (typeof exports === 'object') {
|
9
|
+
module.exports = factory(require('../moment')); // Node
|
10
|
+
} else {
|
11
|
+
factory(window.moment); // Browser global
|
12
|
+
}
|
13
|
+
}(function (moment) {
|
14
|
+
|
15
|
+
var suffixes = {
|
16
|
+
1: "-inci",
|
17
|
+
5: "-inci",
|
18
|
+
8: "-inci",
|
19
|
+
70: "-inci",
|
20
|
+
80: "-inci",
|
21
|
+
|
22
|
+
2: "-nci",
|
23
|
+
7: "-nci",
|
24
|
+
20: "-nci",
|
25
|
+
50: "-nci",
|
26
|
+
|
27
|
+
3: "-üncü",
|
28
|
+
4: "-üncü",
|
29
|
+
100: "-üncü",
|
30
|
+
|
31
|
+
6: "-ncı",
|
32
|
+
|
33
|
+
9: "-uncu",
|
34
|
+
10: "-uncu",
|
35
|
+
30: "-uncu",
|
36
|
+
|
37
|
+
60: "-ıncı",
|
38
|
+
90: "-ıncı"
|
39
|
+
};
|
40
|
+
return moment.lang('az', {
|
41
|
+
months : "yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),
|
42
|
+
monthsShort : "yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),
|
43
|
+
weekdays : "Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),
|
44
|
+
weekdaysShort : "Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),
|
45
|
+
weekdaysMin : "Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),
|
46
|
+
longDateFormat : {
|
47
|
+
LT : "HH:mm",
|
48
|
+
L : "DD.MM.YYYY",
|
49
|
+
LL : "D MMMM YYYY",
|
50
|
+
LLL : "D MMMM YYYY LT",
|
51
|
+
LLLL : "dddd, D MMMM YYYY LT"
|
52
|
+
},
|
53
|
+
calendar : {
|
54
|
+
sameDay : '[bugün saat] LT',
|
55
|
+
nextDay : '[sabah saat] LT',
|
56
|
+
nextWeek : '[gələn həftə] dddd [saat] LT',
|
57
|
+
lastDay : '[dünən] LT',
|
58
|
+
lastWeek : '[keçən həftə] dddd [saat] LT',
|
59
|
+
sameElse : 'L'
|
60
|
+
},
|
61
|
+
relativeTime : {
|
62
|
+
future : "%s sonra",
|
63
|
+
past : "%s əvvəl",
|
64
|
+
s : "birneçə saniyyə",
|
65
|
+
m : "bir dəqiqə",
|
66
|
+
mm : "%d dəqiqə",
|
67
|
+
h : "bir saat",
|
68
|
+
hh : "%d saat",
|
69
|
+
d : "bir gün",
|
70
|
+
dd : "%d gün",
|
71
|
+
M : "bir ay",
|
72
|
+
MM : "%d ay",
|
73
|
+
y : "bir il",
|
74
|
+
yy : "%d il"
|
75
|
+
},
|
76
|
+
meridiem : function (hour, minute, isLower) {
|
77
|
+
if (hour < 4) {
|
78
|
+
return "gecə";
|
79
|
+
} else if (hour < 12) {
|
80
|
+
return "səhər";
|
81
|
+
} else if (hour < 17) {
|
82
|
+
return "gündüz";
|
83
|
+
} else {
|
84
|
+
return "axşam";
|
85
|
+
}
|
86
|
+
},
|
87
|
+
ordinal : function (number) {
|
88
|
+
if (number === 0) { // special case for zero
|
89
|
+
return number + "-ıncı";
|
90
|
+
}
|
91
|
+
var a = number % 10,
|
92
|
+
b = number % 100 - a,
|
93
|
+
c = number >= 100 ? 100 : null;
|
94
|
+
|
95
|
+
return number + (suffixes[a] || suffixes[b] || suffixes[c]);
|
96
|
+
},
|
97
|
+
week : {
|
98
|
+
dow : 1, // Monday is the first day of the week.
|
99
|
+
doy : 7 // The week that contains Jan 1st is the first week of the year.
|
100
|
+
}
|
101
|
+
});
|
102
|
+
}));
|
@@ -0,0 +1,106 @@
|
|
1
|
+
// moment.js language configuration
|
2
|
+
// language : Bengali (bn)
|
3
|
+
// author : Kaushik Gandhi : https://github.com/kaushikgandhi
|
4
|
+
|
5
|
+
(function (factory) {
|
6
|
+
if (typeof define === 'function' && define.amd) {
|
7
|
+
define(['moment'], factory); // AMD
|
8
|
+
} else if (typeof exports === 'object') {
|
9
|
+
module.exports = factory(require('../moment')); // Node
|
10
|
+
} else {
|
11
|
+
factory(window.moment); // Browser global
|
12
|
+
}
|
13
|
+
}(function (moment) {
|
14
|
+
var symbolMap = {
|
15
|
+
'1': '১',
|
16
|
+
'2': '২',
|
17
|
+
'3': '৩',
|
18
|
+
'4': '৪',
|
19
|
+
'5': '৫',
|
20
|
+
'6': '৬',
|
21
|
+
'7': '৭',
|
22
|
+
'8': '৮',
|
23
|
+
'9': '৯',
|
24
|
+
'0': '০'
|
25
|
+
},
|
26
|
+
numberMap = {
|
27
|
+
'১': '1',
|
28
|
+
'২': '2',
|
29
|
+
'৩': '3',
|
30
|
+
'৪': '4',
|
31
|
+
'৫': '5',
|
32
|
+
'৬': '6',
|
33
|
+
'৭': '7',
|
34
|
+
'৮': '8',
|
35
|
+
'৯': '9',
|
36
|
+
'০': '0'
|
37
|
+
};
|
38
|
+
|
39
|
+
return moment.lang('bn', {
|
40
|
+
months : 'জানুয়ারী_ফেবুয়ারী_মার্চ_এপ্রিল_মে_জুন_জুলাই_অগাস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split("_"),
|
41
|
+
monthsShort : 'জানু_ফেব_মার্চ_এপর_মে_জুন_জুল_অগ_সেপ্ট_অক্টো_নভ_ডিসেম্'.split("_"),
|
42
|
+
weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পত্তিবার_শুক্রুবার_শনিবার'.split("_"),
|
43
|
+
weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পত্তি_শুক্রু_শনি'.split("_"),
|
44
|
+
weekdaysMin : 'রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি'.split("_"),
|
45
|
+
longDateFormat : {
|
46
|
+
LT : "A h:mm সময়",
|
47
|
+
L : "DD/MM/YYYY",
|
48
|
+
LL : "D MMMM YYYY",
|
49
|
+
LLL : "D MMMM YYYY, LT",
|
50
|
+
LLLL : "dddd, D MMMM YYYY, LT"
|
51
|
+
},
|
52
|
+
calendar : {
|
53
|
+
sameDay : '[আজ] LT',
|
54
|
+
nextDay : '[আগামীকাল] LT',
|
55
|
+
nextWeek : 'dddd, LT',
|
56
|
+
lastDay : '[গতকাল] LT',
|
57
|
+
lastWeek : '[গত] dddd, LT',
|
58
|
+
sameElse : 'L'
|
59
|
+
},
|
60
|
+
relativeTime : {
|
61
|
+
future : "%s পরে",
|
62
|
+
past : "%s আগে",
|
63
|
+
s : "কএক সেকেন্ড",
|
64
|
+
m : "এক মিনিট",
|
65
|
+
mm : "%d মিনিট",
|
66
|
+
h : "এক ঘন্টা",
|
67
|
+
hh : "%d ঘন্টা",
|
68
|
+
d : "এক দিন",
|
69
|
+
dd : "%d দিন",
|
70
|
+
M : "এক মাস",
|
71
|
+
MM : "%d মাস",
|
72
|
+
y : "এক বছর",
|
73
|
+
yy : "%d বছর"
|
74
|
+
},
|
75
|
+
preparse: function (string) {
|
76
|
+
return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
|
77
|
+
return numberMap[match];
|
78
|
+
});
|
79
|
+
},
|
80
|
+
postformat: function (string) {
|
81
|
+
return string.replace(/\d/g, function (match) {
|
82
|
+
return symbolMap[match];
|
83
|
+
});
|
84
|
+
},
|
85
|
+
//Bengali is a vast language its spoken
|
86
|
+
//in different forms in various parts of the world.
|
87
|
+
//I have just generalized with most common one used
|
88
|
+
meridiem : function (hour, minute, isLower) {
|
89
|
+
if (hour < 4) {
|
90
|
+
return "রাত";
|
91
|
+
} else if (hour < 10) {
|
92
|
+
return "শকাল";
|
93
|
+
} else if (hour < 17) {
|
94
|
+
return "দুপুর";
|
95
|
+
} else if (hour < 20) {
|
96
|
+
return "বিকেল";
|
97
|
+
} else {
|
98
|
+
return "রাত";
|
99
|
+
}
|
100
|
+
},
|
101
|
+
week : {
|
102
|
+
dow : 0, // Sunday is the first day of the week.
|
103
|
+
doy : 6 // The week that contains Jan 1st is the first week of the year.
|
104
|
+
}
|
105
|
+
});
|
106
|
+
}));
|
@@ -20,9 +20,9 @@
|
|
20
20
|
longDateFormat : {
|
21
21
|
LT : "HH:mm",
|
22
22
|
L : "DD/MM/YYYY",
|
23
|
-
LL : "D MMMM YYYY",
|
24
|
-
LLL : "D MMMM YYYY LT",
|
25
|
-
LLLL : "dddd D. MMMM
|
23
|
+
LL : "D. MMMM YYYY",
|
24
|
+
LLL : "D. MMMM YYYY LT",
|
25
|
+
LLLL : "dddd [d.] D. MMMM YYYY LT"
|
26
26
|
},
|
27
27
|
calendar : {
|
28
28
|
sameDay : '[I dag kl.] LT',
|
@@ -0,0 +1,72 @@
|
|
1
|
+
// moment.js language configuration
|
2
|
+
// language : austrian german (de-at)
|
3
|
+
// author : lluchs : https://github.com/lluchs
|
4
|
+
// author: Menelion Elensúle: https://github.com/Oire
|
5
|
+
// author : Martin Groller : https://github.com/MadMG
|
6
|
+
|
7
|
+
(function (factory) {
|
8
|
+
if (typeof define === 'function' && define.amd) {
|
9
|
+
define(['moment'], factory); // AMD
|
10
|
+
} else if (typeof exports === 'object') {
|
11
|
+
module.exports = factory(require('../moment')); // Node
|
12
|
+
} else {
|
13
|
+
factory(window.moment); // Browser global
|
14
|
+
}
|
15
|
+
}(function (moment) {
|
16
|
+
function processRelativeTime(number, withoutSuffix, key, isFuture) {
|
17
|
+
var format = {
|
18
|
+
'm': ['eine Minute', 'einer Minute'],
|
19
|
+
'h': ['eine Stunde', 'einer Stunde'],
|
20
|
+
'd': ['ein Tag', 'einem Tag'],
|
21
|
+
'dd': [number + ' Tage', number + ' Tagen'],
|
22
|
+
'M': ['ein Monat', 'einem Monat'],
|
23
|
+
'MM': [number + ' Monate', number + ' Monaten'],
|
24
|
+
'y': ['ein Jahr', 'einem Jahr'],
|
25
|
+
'yy': [number + ' Jahre', number + ' Jahren']
|
26
|
+
};
|
27
|
+
return withoutSuffix ? format[key][0] : format[key][1];
|
28
|
+
}
|
29
|
+
|
30
|
+
return moment.lang('de-at', {
|
31
|
+
months : "Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),
|
32
|
+
monthsShort : "Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),
|
33
|
+
weekdays : "Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),
|
34
|
+
weekdaysShort : "So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),
|
35
|
+
weekdaysMin : "So_Mo_Di_Mi_Do_Fr_Sa".split("_"),
|
36
|
+
longDateFormat : {
|
37
|
+
LT: "HH:mm [Uhr]",
|
38
|
+
L : "DD.MM.YYYY",
|
39
|
+
LL : "D. MMMM YYYY",
|
40
|
+
LLL : "D. MMMM YYYY LT",
|
41
|
+
LLLL : "dddd, D. MMMM YYYY LT"
|
42
|
+
},
|
43
|
+
calendar : {
|
44
|
+
sameDay: "[Heute um] LT",
|
45
|
+
sameElse: "L",
|
46
|
+
nextDay: '[Morgen um] LT',
|
47
|
+
nextWeek: 'dddd [um] LT',
|
48
|
+
lastDay: '[Gestern um] LT',
|
49
|
+
lastWeek: '[letzten] dddd [um] LT'
|
50
|
+
},
|
51
|
+
relativeTime : {
|
52
|
+
future : "in %s",
|
53
|
+
past : "vor %s",
|
54
|
+
s : "ein paar Sekunden",
|
55
|
+
m : processRelativeTime,
|
56
|
+
mm : "%d Minuten",
|
57
|
+
h : processRelativeTime,
|
58
|
+
hh : "%d Stunden",
|
59
|
+
d : processRelativeTime,
|
60
|
+
dd : processRelativeTime,
|
61
|
+
M : processRelativeTime,
|
62
|
+
MM : processRelativeTime,
|
63
|
+
y : processRelativeTime,
|
64
|
+
yy : processRelativeTime
|
65
|
+
},
|
66
|
+
ordinal : '%d.',
|
67
|
+
week : {
|
68
|
+
dow : 1, // Monday is the first day of the week.
|
69
|
+
doy : 4 // The week that contains Jan 4th is the first week of the year.
|
70
|
+
}
|
71
|
+
});
|
72
|
+
}));
|
@@ -44,13 +44,24 @@
|
|
44
44
|
nextDay : '[Αύριο {}] LT',
|
45
45
|
nextWeek : 'dddd [{}] LT',
|
46
46
|
lastDay : '[Χθες {}] LT',
|
47
|
-
lastWeek :
|
47
|
+
lastWeek : function() {
|
48
|
+
switch (this.day()) {
|
49
|
+
case 6:
|
50
|
+
return '[το προηγούμενο] dddd [{}] LT';
|
51
|
+
default:
|
52
|
+
return '[την προηγούμενη] dddd [{}] LT';
|
53
|
+
}
|
54
|
+
},
|
48
55
|
sameElse : 'L'
|
49
56
|
},
|
50
57
|
calendar : function (key, mom) {
|
51
58
|
var output = this._calendarEl[key],
|
52
59
|
hours = mom && mom.hours();
|
53
60
|
|
61
|
+
if (typeof output === 'function') {
|
62
|
+
output = output.apply(mom);
|
63
|
+
}
|
64
|
+
|
54
65
|
return output.replace("{}", (hours % 12 === 1 ? "στη" : "στις"));
|
55
66
|
},
|
56
67
|
relativeTime : {
|
@@ -13,8 +13,8 @@
|
|
13
13
|
}
|
14
14
|
}(function (moment) {
|
15
15
|
return moment.lang('it', {
|
16
|
-
months : "
|
17
|
-
monthsShort : "
|
16
|
+
months : "gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),
|
17
|
+
monthsShort : "gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),
|
18
18
|
weekdays : "Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),
|
19
19
|
weekdaysShort : "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),
|
20
20
|
weekdaysMin : "D_L_Ma_Me_G_V_S".split("_"),
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"y" : "metai_metų_metus",
|
24
24
|
"yy": "metai_metų_metus"
|
25
25
|
},
|
26
|
-
weekDays = "
|
26
|
+
weekDays = "sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_");
|
27
27
|
|
28
28
|
function translateSeconds(number, withoutSuffix, key, isFuture) {
|
29
29
|
if (withoutSuffix) {
|
@@ -62,7 +62,7 @@
|
|
62
62
|
|
63
63
|
function relativeWeekDay(moment, format) {
|
64
64
|
var nominative = format.indexOf('dddd HH:mm') === -1,
|
65
|
-
weekDay = weekDays[moment.
|
65
|
+
weekDay = weekDays[moment.day()];
|
66
66
|
|
67
67
|
return nominative ? weekDay : weekDay.substring(0, weekDay.length - 2) + "į";
|
68
68
|
}
|
@@ -125,7 +125,10 @@
|
|
125
125
|
yy : relativeTimeWithPlural
|
126
126
|
},
|
127
127
|
|
128
|
-
|
128
|
+
meridiemParse: /ночи|утра|дня|вечера/i,
|
129
|
+
isPM : function (input) {
|
130
|
+
return /^(дня|вечера)$/.test(input);
|
131
|
+
},
|
129
132
|
|
130
133
|
meridiem : function (hour, minute, isLower) {
|
131
134
|
if (hour < 4) {
|
@@ -0,0 +1,106 @@
|
|
1
|
+
// moment.js language configuration
|
2
|
+
// language : Serbian-cyrillic (sr-cyrl)
|
3
|
+
// author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
|
4
|
+
|
5
|
+
(function (factory) {
|
6
|
+
if (typeof define === 'function' && define.amd) {
|
7
|
+
define(['moment'], factory); // AMD
|
8
|
+
} else if (typeof exports === 'object') {
|
9
|
+
module.exports = factory(require('../moment')); // Node
|
10
|
+
} else {
|
11
|
+
factory(window.moment); // Browser global
|
12
|
+
}
|
13
|
+
}(function (moment) {
|
14
|
+
|
15
|
+
var translator = {
|
16
|
+
words: { //Different grammatical cases
|
17
|
+
m: ['један минут', 'једне минуте'],
|
18
|
+
mm: ['минут', 'минуте', 'минута'],
|
19
|
+
h: ['један сат', 'једног сата'],
|
20
|
+
hh: ['сат', 'сата', 'сати'],
|
21
|
+
dd: ['дан', 'дана', 'дана'],
|
22
|
+
MM: ['месец', 'месеца', 'месеци'],
|
23
|
+
yy: ['година', 'године', 'година']
|
24
|
+
},
|
25
|
+
correctGrammaticalCase: function (number, wordKey) {
|
26
|
+
return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
|
27
|
+
},
|
28
|
+
translate: function (number, withoutSuffix, key) {
|
29
|
+
var wordKey = translator.words[key];
|
30
|
+
if (key.length === 1) {
|
31
|
+
return withoutSuffix ? wordKey[0] : wordKey[1];
|
32
|
+
} else {
|
33
|
+
return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
};
|
37
|
+
|
38
|
+
return moment.lang('sr-cyrl', {
|
39
|
+
months: ['јануар', 'фебруар', 'март', 'април', 'мај', 'јун', 'јул', 'август', 'септембар', 'октобар', 'новембар', 'децембар'],
|
40
|
+
monthsShort: ['јан.', 'феб.', 'мар.', 'апр.', 'мај', 'јун', 'јул', 'авг.', 'сеп.', 'окт.', 'нов.', 'дец.'],
|
41
|
+
weekdays: ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'],
|
42
|
+
weekdaysShort: ['нед.', 'пон.', 'уто.', 'сре.', 'чет.', 'пет.', 'суб.'],
|
43
|
+
weekdaysMin: ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'],
|
44
|
+
longDateFormat: {
|
45
|
+
LT: "H:mm",
|
46
|
+
L: "DD. MM. YYYY",
|
47
|
+
LL: "D. MMMM YYYY",
|
48
|
+
LLL: "D. MMMM YYYY LT",
|
49
|
+
LLLL: "dddd, D. MMMM YYYY LT"
|
50
|
+
},
|
51
|
+
calendar: {
|
52
|
+
sameDay: '[данас у] LT',
|
53
|
+
nextDay: '[сутра у] LT',
|
54
|
+
|
55
|
+
nextWeek: function () {
|
56
|
+
switch (this.day()) {
|
57
|
+
case 0:
|
58
|
+
return '[у] [недељу] [у] LT';
|
59
|
+
case 3:
|
60
|
+
return '[у] [среду] [у] LT';
|
61
|
+
case 6:
|
62
|
+
return '[у] [суботу] [у] LT';
|
63
|
+
case 1:
|
64
|
+
case 2:
|
65
|
+
case 4:
|
66
|
+
case 5:
|
67
|
+
return '[у] dddd [у] LT';
|
68
|
+
}
|
69
|
+
},
|
70
|
+
lastDay : '[јуче у] LT',
|
71
|
+
lastWeek : function () {
|
72
|
+
var lastWeekDays = [
|
73
|
+
'[прошле] [недеље] [у] LT',
|
74
|
+
'[прошлог] [понедељка] [у] LT',
|
75
|
+
'[прошлог] [уторка] [у] LT',
|
76
|
+
'[прошле] [среде] [у] LT',
|
77
|
+
'[прошлог] [четвртка] [у] LT',
|
78
|
+
'[прошлог] [петка] [у] LT',
|
79
|
+
'[прошле] [суботе] [у] LT'
|
80
|
+
];
|
81
|
+
return lastWeekDays[this.day()];
|
82
|
+
},
|
83
|
+
sameElse : 'L'
|
84
|
+
},
|
85
|
+
relativeTime : {
|
86
|
+
future : "за %s",
|
87
|
+
past : "пре %s",
|
88
|
+
s : "неколико секунди",
|
89
|
+
m : translator.translate,
|
90
|
+
mm : translator.translate,
|
91
|
+
h : translator.translate,
|
92
|
+
hh : translator.translate,
|
93
|
+
d : "дан",
|
94
|
+
dd : translator.translate,
|
95
|
+
M : "месец",
|
96
|
+
MM : translator.translate,
|
97
|
+
y : "годину",
|
98
|
+
yy : translator.translate
|
99
|
+
},
|
100
|
+
ordinal : '%d.',
|
101
|
+
week : {
|
102
|
+
dow : 1, // Monday is the first day of the week.
|
103
|
+
doy : 7 // The week that contains Jan 1st is the first week of the year.
|
104
|
+
}
|
105
|
+
});
|
106
|
+
}));
|
@@ -0,0 +1,55 @@
|
|
1
|
+
// moment.js language configuration
|
2
|
+
// language : Morocco Central Atlas Tamaziɣt in Latin (tzm-latn)
|
3
|
+
// author : Abdel Said : https://github.com/abdelsaid
|
4
|
+
|
5
|
+
(function (factory) {
|
6
|
+
if (typeof define === 'function' && define.amd) {
|
7
|
+
define(['moment'], factory); // AMD
|
8
|
+
} else if (typeof exports === 'object') {
|
9
|
+
module.exports = factory(require('../moment')); // Node
|
10
|
+
} else {
|
11
|
+
factory(window.moment); // Browser global
|
12
|
+
}
|
13
|
+
}(function (moment) {
|
14
|
+
return moment.lang('tzm-latn', {
|
15
|
+
months : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
|
16
|
+
monthsShort : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
|
17
|
+
weekdays : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
|
18
|
+
weekdaysShort : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
|
19
|
+
weekdaysMin : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
|
20
|
+
longDateFormat : {
|
21
|
+
LT : "HH:mm",
|
22
|
+
L : "DD/MM/YYYY",
|
23
|
+
LL : "D MMMM YYYY",
|
24
|
+
LLL : "D MMMM YYYY LT",
|
25
|
+
LLLL : "dddd D MMMM YYYY LT"
|
26
|
+
},
|
27
|
+
calendar : {
|
28
|
+
sameDay: "[asdkh g] LT",
|
29
|
+
nextDay: '[aska g] LT',
|
30
|
+
nextWeek: 'dddd [g] LT',
|
31
|
+
lastDay: '[assant g] LT',
|
32
|
+
lastWeek: 'dddd [g] LT',
|
33
|
+
sameElse: 'L'
|
34
|
+
},
|
35
|
+
relativeTime : {
|
36
|
+
future : "dadkh s yan %s",
|
37
|
+
past : "yan %s",
|
38
|
+
s : "imik",
|
39
|
+
m : "minuḍ",
|
40
|
+
mm : "%d minuḍ",
|
41
|
+
h : "saɛa",
|
42
|
+
hh : "%d tassaɛin",
|
43
|
+
d : "ass",
|
44
|
+
dd : "%d ossan",
|
45
|
+
M : "ayowr",
|
46
|
+
MM : "%d iyyirn",
|
47
|
+
y : "asgas",
|
48
|
+
yy : "%d isgasn"
|
49
|
+
},
|
50
|
+
week : {
|
51
|
+
dow : 6, // Saturday is the first day of the week.
|
52
|
+
doy : 12 // The week that contains Jan 1st is the first week of the year.
|
53
|
+
}
|
54
|
+
});
|
55
|
+
}));
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: momentjs-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Prior
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -78,8 +78,11 @@ files:
|
|
78
78
|
- test/test_helper.rb
|
79
79
|
- vendor/assets/javascripts/moment.js
|
80
80
|
- vendor/assets/javascripts/moment/ar-ma.js
|
81
|
+
- vendor/assets/javascripts/moment/ar-sa.js
|
81
82
|
- vendor/assets/javascripts/moment/ar.js
|
83
|
+
- vendor/assets/javascripts/moment/az.js
|
82
84
|
- vendor/assets/javascripts/moment/bg.js
|
85
|
+
- vendor/assets/javascripts/moment/bn.js
|
83
86
|
- vendor/assets/javascripts/moment/br.js
|
84
87
|
- vendor/assets/javascripts/moment/bs.js
|
85
88
|
- vendor/assets/javascripts/moment/ca.js
|
@@ -87,6 +90,7 @@ files:
|
|
87
90
|
- vendor/assets/javascripts/moment/cv.js
|
88
91
|
- vendor/assets/javascripts/moment/cy.js
|
89
92
|
- vendor/assets/javascripts/moment/da.js
|
93
|
+
- vendor/assets/javascripts/moment/de-at.js
|
90
94
|
- vendor/assets/javascripts/moment/de.js
|
91
95
|
- vendor/assets/javascripts/moment/el.js
|
92
96
|
- vendor/assets/javascripts/moment/en-au.js
|
@@ -135,6 +139,7 @@ files:
|
|
135
139
|
- vendor/assets/javascripts/moment/sl.js
|
136
140
|
- vendor/assets/javascripts/moment/sq.js
|
137
141
|
- vendor/assets/javascripts/moment/sr-cyr.js
|
142
|
+
- vendor/assets/javascripts/moment/sr-cyrl.js
|
138
143
|
- vendor/assets/javascripts/moment/sr.js
|
139
144
|
- vendor/assets/javascripts/moment/sv.js
|
140
145
|
- vendor/assets/javascripts/moment/ta.js
|
@@ -142,6 +147,7 @@ files:
|
|
142
147
|
- vendor/assets/javascripts/moment/tl-ph.js
|
143
148
|
- vendor/assets/javascripts/moment/tr.js
|
144
149
|
- vendor/assets/javascripts/moment/tzm-la.js
|
150
|
+
- vendor/assets/javascripts/moment/tzm-latn.js
|
145
151
|
- vendor/assets/javascripts/moment/tzm.js
|
146
152
|
- vendor/assets/javascripts/moment/uk.js
|
147
153
|
- vendor/assets/javascripts/moment/uz.js
|