date-and-time 1.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EXTEND.md +28 -10
- package/LOCALE.md +1 -0
- package/PLUGINS.md +185 -63
- package/README.md +91 -76
- package/date-and-time.js +140 -102
- package/date-and-time.min.js +12 -12
- package/esm/date-and-time.es.js +138 -100
- package/esm/date-and-time.es.min.js +13 -12
- package/esm/date-and-time.mjs +138 -100
- package/esm/locale/ar.es.js +1 -1
- package/esm/locale/ar.mjs +1 -1
- package/esm/locale/az.es.js +1 -1
- package/esm/locale/az.mjs +1 -1
- package/esm/locale/bn.es.js +1 -1
- package/esm/locale/bn.mjs +1 -1
- package/esm/locale/cs.es.js +1 -1
- package/esm/locale/cs.mjs +1 -1
- package/esm/locale/de.es.js +1 -1
- package/esm/locale/de.mjs +1 -1
- package/esm/locale/dk.es.js +1 -1
- package/esm/locale/dk.mjs +1 -1
- package/esm/locale/el.es.js +7 -5
- package/esm/locale/el.mjs +7 -5
- package/esm/locale/en.es.js +3 -2
- package/esm/locale/en.mjs +3 -2
- package/esm/locale/es.es.js +1 -1
- package/esm/locale/es.mjs +1 -1
- package/esm/locale/fa.es.js +1 -1
- package/esm/locale/fa.mjs +1 -1
- package/esm/locale/fr.es.js +1 -1
- package/esm/locale/fr.mjs +1 -1
- package/esm/locale/hi.es.js +1 -1
- package/esm/locale/hi.mjs +1 -1
- package/esm/locale/hu.es.js +1 -1
- package/esm/locale/hu.mjs +1 -1
- package/esm/locale/id.es.js +1 -1
- package/esm/locale/id.mjs +1 -1
- package/esm/locale/it.es.js +1 -1
- package/esm/locale/it.mjs +1 -1
- package/esm/locale/ja.es.js +1 -1
- package/esm/locale/ja.mjs +1 -1
- package/esm/locale/jv.es.js +1 -1
- package/esm/locale/jv.mjs +1 -1
- package/esm/locale/ko.es.js +1 -1
- package/esm/locale/ko.mjs +1 -1
- package/esm/locale/my.es.js +1 -1
- package/esm/locale/my.mjs +1 -1
- package/esm/locale/nl.es.js +7 -5
- package/esm/locale/nl.mjs +7 -5
- package/esm/locale/pa-in.es.js +1 -1
- package/esm/locale/pa-in.mjs +1 -1
- package/esm/locale/pl.es.js +7 -5
- package/esm/locale/pl.mjs +7 -5
- package/esm/locale/pt.es.js +1 -1
- package/esm/locale/pt.mjs +1 -1
- package/esm/locale/ro.es.js +1 -1
- package/esm/locale/ro.mjs +1 -1
- package/esm/locale/ru.es.js +1 -1
- package/esm/locale/ru.mjs +1 -1
- package/esm/locale/rw.es.js +1 -1
- package/esm/locale/rw.mjs +1 -1
- package/esm/locale/sr.es.js +1 -1
- package/esm/locale/sr.mjs +1 -1
- package/esm/locale/sv.es.js +22 -0
- package/esm/locale/sv.mjs +22 -0
- package/esm/locale/th.es.js +1 -1
- package/esm/locale/th.mjs +1 -1
- package/esm/locale/tr.es.js +1 -1
- package/esm/locale/tr.mjs +1 -1
- package/esm/locale/uk.es.js +10 -8
- package/esm/locale/uk.mjs +10 -8
- package/esm/locale/uz.es.js +1 -1
- package/esm/locale/uz.mjs +1 -1
- package/esm/locale/vi.es.js +1 -1
- package/esm/locale/vi.mjs +1 -1
- package/esm/locale/zh-cn.es.js +1 -1
- package/esm/locale/zh-cn.mjs +1 -1
- package/esm/locale/zh-tw.es.js +1 -1
- package/esm/locale/zh-tw.mjs +1 -1
- package/esm/plugin/day-of-week.es.js +1 -1
- package/esm/plugin/day-of-week.mjs +1 -1
- package/esm/plugin/meridiem.es.js +20 -11
- package/esm/plugin/meridiem.mjs +20 -11
- package/esm/plugin/microsecond.es.js +1 -1
- package/esm/plugin/microsecond.mjs +1 -1
- package/esm/plugin/ordinal.es.js +1 -1
- package/esm/plugin/ordinal.mjs +1 -1
- package/esm/plugin/timespan.es.js +1 -1
- package/esm/plugin/timespan.mjs +1 -1
- package/esm/plugin/timezone.es.js +73 -0
- package/esm/plugin/timezone.mjs +73 -0
- package/esm/plugin/two-digit-year.es.js +1 -6
- package/esm/plugin/two-digit-year.mjs +1 -6
- package/locale/ar.js +2 -2
- package/locale/az.js +2 -2
- package/locale/bn.js +2 -2
- package/locale/cs.js +2 -2
- package/locale/de.js +2 -2
- package/locale/dk.js +2 -2
- package/locale/el.js +8 -6
- package/locale/en.js +4 -3
- package/locale/es.js +2 -2
- package/locale/fa.js +2 -2
- package/locale/fr.js +2 -2
- package/locale/hi.js +2 -2
- package/locale/hu.js +2 -2
- package/locale/id.js +2 -2
- package/locale/it.js +2 -2
- package/locale/ja.js +2 -2
- package/locale/jv.js +2 -2
- package/locale/ko.js +2 -2
- package/locale/my.js +2 -2
- package/locale/nl.js +8 -6
- package/locale/pa-in.js +3 -3
- package/locale/pl.js +8 -6
- package/locale/pt.js +2 -2
- package/locale/ro.js +2 -2
- package/locale/ru.js +2 -2
- package/locale/rw.js +2 -2
- package/locale/sr.js +2 -2
- package/locale/sv.js +30 -0
- package/locale/th.js +2 -2
- package/locale/tr.js +2 -2
- package/locale/uk.js +11 -9
- package/locale/uz.js +2 -2
- package/locale/vi.js +2 -2
- package/locale/zh-cn.js +3 -3
- package/locale/zh-tw.js +3 -3
- package/package.json +4 -4
- package/plugin/day-of-week.js +3 -3
- package/plugin/meridiem.js +21 -12
- package/plugin/microsecond.js +2 -2
- package/plugin/ordinal.js +2 -2
- package/plugin/timespan.js +2 -2
- package/plugin/timezone.js +81 -0
- package/plugin/two-digit-year.js +3 -8
package/esm/plugin/meridiem.mjs
CHANGED
|
@@ -8,26 +8,35 @@ var plugin = function (date) {
|
|
|
8
8
|
|
|
9
9
|
date.plugin(name, {
|
|
10
10
|
res: {
|
|
11
|
-
|
|
11
|
+
AA: ['A.M.', 'P.M.'],
|
|
12
|
+
a: ['am', 'pm'],
|
|
13
|
+
aa: ['a.m.', 'p.m.']
|
|
12
14
|
},
|
|
13
15
|
formatter: {
|
|
14
16
|
AA: function (d) {
|
|
15
|
-
|
|
16
|
-
return this.res.A[d.getHours() > 11 | 0 + 2];
|
|
17
|
+
return this.res.AA[d.getHours() > 11 | 0];
|
|
17
18
|
},
|
|
18
19
|
a: function (d) {
|
|
19
|
-
|
|
20
|
-
return this.res.A[d.getHours() > 11 | 0 + 4];
|
|
20
|
+
return this.res.a[d.getHours() > 11 | 0];
|
|
21
21
|
},
|
|
22
22
|
aa: function (d) {
|
|
23
|
-
|
|
24
|
-
return this.res.A[d.getHours() > 11 | 0 + 6];
|
|
23
|
+
return this.res.aa[d.getHours() > 11 | 0];
|
|
25
24
|
}
|
|
26
25
|
},
|
|
27
26
|
parser: {
|
|
28
|
-
|
|
29
|
-
var result = this.find(this.res.
|
|
30
|
-
result.
|
|
27
|
+
AA: function (str) {
|
|
28
|
+
var result = this.find(this.res.AA, str);
|
|
29
|
+
result.token = 'A';
|
|
30
|
+
return result;
|
|
31
|
+
},
|
|
32
|
+
a: function (str) {
|
|
33
|
+
var result = this.find(this.res.a, str);
|
|
34
|
+
result.token = 'A';
|
|
35
|
+
return result;
|
|
36
|
+
},
|
|
37
|
+
aa: function (str) {
|
|
38
|
+
var result = this.find(this.res.aa, str);
|
|
39
|
+
result.token = 'A';
|
|
31
40
|
return result;
|
|
32
41
|
}
|
|
33
42
|
}
|
|
@@ -35,4 +44,4 @@ var plugin = function (date) {
|
|
|
35
44
|
return name;
|
|
36
45
|
};
|
|
37
46
|
|
|
38
|
-
export default
|
|
47
|
+
export { plugin as default };
|
package/esm/plugin/ordinal.es.js
CHANGED
package/esm/plugin/ordinal.mjs
CHANGED
package/esm/plugin/timespan.mjs
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @preserve date-and-time.js plugin
|
|
3
|
+
* @preserve timezone
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
var plugin = function (date, localized_date) {
|
|
7
|
+
var options = {
|
|
8
|
+
year: 'numeric', month: 'numeric', day: 'numeric',
|
|
9
|
+
hour: 'numeric', minute: 'numeric', second: 'numeric'
|
|
10
|
+
};
|
|
11
|
+
var pattern = date.compile('M/D/Y, h:mm:ss A');
|
|
12
|
+
var formatTZ = function (dateObj, arg, timeZone) {
|
|
13
|
+
options.timeZone = 'UTC';
|
|
14
|
+
var utcObj = date.parse(new Intl.DateTimeFormat('en-US', options).format(dateObj), pattern);
|
|
15
|
+
|
|
16
|
+
options.timeZone = timeZone;
|
|
17
|
+
var dateObj2 = date.parse(new Intl.DateTimeFormat('en-US', options).format(dateObj), pattern);
|
|
18
|
+
|
|
19
|
+
var dateObj3 = date.addMilliseconds(dateObj2, dateObj.getMilliseconds());
|
|
20
|
+
|
|
21
|
+
dateObj3.getTimezoneOffset = function () { return (utcObj.getTime() - dateObj2.getTime()) / 60000 | 0; };
|
|
22
|
+
return localized_date.format(dateObj3, arg);
|
|
23
|
+
};
|
|
24
|
+
var adjustments = [
|
|
25
|
+
-60, -30, -20,
|
|
26
|
+
0,
|
|
27
|
+
60, 30, 20
|
|
28
|
+
];
|
|
29
|
+
var parseTZ = function (dateString, arg, timeZone) {
|
|
30
|
+
var pattern2 = typeof arg === 'string' ? date.compile(arg) : arg;
|
|
31
|
+
var dateObj = localized_date.parse(dateString, pattern2, true);
|
|
32
|
+
|
|
33
|
+
for (var i = 1, len = pattern2.length; i < len; i++) {
|
|
34
|
+
if (pattern2[i].indexOf('Z') === 0) {
|
|
35
|
+
return dateObj;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
options.timeZone = timeZone;
|
|
40
|
+
var dateTimeFormat = new Intl.DateTimeFormat('en-US', options);
|
|
41
|
+
var dateObj2 = date.addMilliseconds(
|
|
42
|
+
date.parse(dateTimeFormat.format(dateObj), pattern, true),
|
|
43
|
+
dateObj.getMilliseconds()
|
|
44
|
+
);
|
|
45
|
+
var offset = dateObj.getTime() - dateObj2.getTime();
|
|
46
|
+
var dateString2 = date.format(localized_date.parse(dateString, pattern2), pattern);
|
|
47
|
+
|
|
48
|
+
var comparer = function (d) {
|
|
49
|
+
return dateString2 === dateTimeFormat.format(d);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// Trying to adjust for daylight saving time.
|
|
53
|
+
for (var j = 0, len2 = adjustments.length; j < len2; j++) {
|
|
54
|
+
var d = date.addMilliseconds(dateObj, offset + adjustments[j] * 60000);
|
|
55
|
+
if (comparer(d)) {
|
|
56
|
+
return d;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return NaN;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var name = 'timezone';
|
|
63
|
+
|
|
64
|
+
date.plugin(name, {
|
|
65
|
+
extender: {
|
|
66
|
+
formatTZ: formatTZ,
|
|
67
|
+
parseTZ: parseTZ
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
return name;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export { plugin as default };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @preserve date-and-time.js plugin
|
|
3
|
+
* @preserve timezone
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
var plugin = function (date, localized_date) {
|
|
7
|
+
var options = {
|
|
8
|
+
year: 'numeric', month: 'numeric', day: 'numeric',
|
|
9
|
+
hour: 'numeric', minute: 'numeric', second: 'numeric'
|
|
10
|
+
};
|
|
11
|
+
var pattern = date.compile('M/D/Y, h:mm:ss A');
|
|
12
|
+
var formatTZ = function (dateObj, arg, timeZone) {
|
|
13
|
+
options.timeZone = 'UTC';
|
|
14
|
+
var utcObj = date.parse(new Intl.DateTimeFormat('en-US', options).format(dateObj), pattern);
|
|
15
|
+
|
|
16
|
+
options.timeZone = timeZone;
|
|
17
|
+
var dateObj2 = date.parse(new Intl.DateTimeFormat('en-US', options).format(dateObj), pattern);
|
|
18
|
+
|
|
19
|
+
var dateObj3 = date.addMilliseconds(dateObj2, dateObj.getMilliseconds());
|
|
20
|
+
|
|
21
|
+
dateObj3.getTimezoneOffset = function () { return (utcObj.getTime() - dateObj2.getTime()) / 60000 | 0; };
|
|
22
|
+
return localized_date.format(dateObj3, arg);
|
|
23
|
+
};
|
|
24
|
+
var adjustments = [
|
|
25
|
+
-60, -30, -20,
|
|
26
|
+
0,
|
|
27
|
+
60, 30, 20
|
|
28
|
+
];
|
|
29
|
+
var parseTZ = function (dateString, arg, timeZone) {
|
|
30
|
+
var pattern2 = typeof arg === 'string' ? date.compile(arg) : arg;
|
|
31
|
+
var dateObj = localized_date.parse(dateString, pattern2, true);
|
|
32
|
+
|
|
33
|
+
for (var i = 1, len = pattern2.length; i < len; i++) {
|
|
34
|
+
if (pattern2[i].indexOf('Z') === 0) {
|
|
35
|
+
return dateObj;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
options.timeZone = timeZone;
|
|
40
|
+
var dateTimeFormat = new Intl.DateTimeFormat('en-US', options);
|
|
41
|
+
var dateObj2 = date.addMilliseconds(
|
|
42
|
+
date.parse(dateTimeFormat.format(dateObj), pattern, true),
|
|
43
|
+
dateObj.getMilliseconds()
|
|
44
|
+
);
|
|
45
|
+
var offset = dateObj.getTime() - dateObj2.getTime();
|
|
46
|
+
var dateString2 = date.format(localized_date.parse(dateString, pattern2), pattern);
|
|
47
|
+
|
|
48
|
+
var comparer = function (d) {
|
|
49
|
+
return dateString2 === dateTimeFormat.format(d);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// Trying to adjust for daylight saving time.
|
|
53
|
+
for (var j = 0, len2 = adjustments.length; j < len2; j++) {
|
|
54
|
+
var d = date.addMilliseconds(dateObj, offset + adjustments[j] * 60000);
|
|
55
|
+
if (comparer(d)) {
|
|
56
|
+
return d;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return NaN;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var name = 'timezone';
|
|
63
|
+
|
|
64
|
+
date.plugin(name, {
|
|
65
|
+
extender: {
|
|
66
|
+
formatTZ: formatTZ,
|
|
67
|
+
parseTZ: parseTZ
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
return name;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export { plugin as default };
|
|
@@ -12,15 +12,10 @@ var plugin = function (date) {
|
|
|
12
12
|
var result = this.exec(/^\d\d/, str);
|
|
13
13
|
result.value += result.value < 70 ? 2000 : 1900;
|
|
14
14
|
return result;
|
|
15
|
-
},
|
|
16
|
-
Y: function (str) {
|
|
17
|
-
var result = this.exec(/^\d\d?/, str);
|
|
18
|
-
result.value += result.value < 70 ? 2000 : 1900;
|
|
19
|
-
return result;
|
|
20
15
|
}
|
|
21
16
|
}
|
|
22
17
|
});
|
|
23
18
|
return name;
|
|
24
19
|
};
|
|
25
20
|
|
|
26
|
-
export default
|
|
21
|
+
export { plugin as default };
|
|
@@ -12,15 +12,10 @@ var plugin = function (date) {
|
|
|
12
12
|
var result = this.exec(/^\d\d/, str);
|
|
13
13
|
result.value += result.value < 70 ? 2000 : 1900;
|
|
14
14
|
return result;
|
|
15
|
-
},
|
|
16
|
-
Y: function (str) {
|
|
17
|
-
var result = this.exec(/^\d\d?/, str);
|
|
18
|
-
result.value += result.value < 70 ? 2000 : 1900;
|
|
19
|
-
return result;
|
|
20
15
|
}
|
|
21
16
|
}
|
|
22
17
|
});
|
|
23
18
|
return name;
|
|
24
19
|
};
|
|
25
20
|
|
|
26
|
-
export default
|
|
21
|
+
export { plugin as default };
|
package/locale/ar.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.ar = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
|
|
45
45
|
return ar;
|
|
46
46
|
|
|
47
|
-
}))
|
|
47
|
+
}));
|
package/locale/az.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.az = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
|
|
50
50
|
return az;
|
|
51
51
|
|
|
52
|
-
}))
|
|
52
|
+
}));
|
package/locale/bn.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.bn = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -55,4 +55,4 @@
|
|
|
55
55
|
|
|
56
56
|
return bn;
|
|
57
57
|
|
|
58
|
-
}))
|
|
58
|
+
}));
|
package/locale/cs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.cs = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -27,4 +27,4 @@
|
|
|
27
27
|
|
|
28
28
|
return cs;
|
|
29
29
|
|
|
30
|
-
}))
|
|
30
|
+
}));
|
package/locale/de.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.de = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
|
|
29
29
|
return de;
|
|
30
30
|
|
|
31
|
-
}))
|
|
31
|
+
}));
|
package/locale/dk.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.dk = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -27,4 +27,4 @@
|
|
|
27
27
|
|
|
28
28
|
return dk;
|
|
29
29
|
|
|
30
|
-
}))
|
|
30
|
+
}));
|
package/locale/el.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.el = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
date.locale(code, {
|
|
17
17
|
res: {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
MMMM: [
|
|
19
|
+
['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'],
|
|
20
|
+
['Ιανουαρίου', 'Φεβρουαρίου', 'Μαρτίου', 'Απριλίου', 'Μαΐου', 'Ιουνίου', 'Ιουλίου', 'Αυγούστου', 'Σεπτεμβρίου', 'Οκτωβρίου', 'Νοεμβρίου', 'Δεκεμβρίου']
|
|
21
|
+
],
|
|
20
22
|
MMM: ['Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαϊ', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ'],
|
|
21
23
|
dddd: ['Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο'],
|
|
22
24
|
ddd: ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ'],
|
|
@@ -25,7 +27,7 @@
|
|
|
25
27
|
},
|
|
26
28
|
formatter: {
|
|
27
29
|
MMMM: function (d, formatString) {
|
|
28
|
-
return this.res[
|
|
30
|
+
return this.res.MMMM[/D.*MMMM/.test(formatString) | 0][d.getMonth()];
|
|
29
31
|
},
|
|
30
32
|
hh: function (d) {
|
|
31
33
|
return ('0' + d.getHours() % 12).slice(-2);
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
},
|
|
37
39
|
parser: {
|
|
38
40
|
MMMM: function (str, formatString) {
|
|
39
|
-
var result = this.find(this.res[
|
|
41
|
+
var result = this.find(this.res.MMMM[/D.*MMMM/.test(formatString) | 0], str);
|
|
40
42
|
result.value++;
|
|
41
43
|
return result;
|
|
42
44
|
}
|
|
@@ -47,4 +49,4 @@
|
|
|
47
49
|
|
|
48
50
|
return el;
|
|
49
51
|
|
|
50
|
-
}))
|
|
52
|
+
}));
|
package/locale/en.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.en = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
* @preserve This is a dummy module.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
var en = function () {
|
|
13
|
+
var en = function (date) {
|
|
14
14
|
var code = 'en';
|
|
15
|
+
|
|
15
16
|
return code;
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
return en;
|
|
19
20
|
|
|
20
|
-
}))
|
|
21
|
+
}));
|
package/locale/es.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.es = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -47,4 +47,4 @@
|
|
|
47
47
|
|
|
48
48
|
return es;
|
|
49
49
|
|
|
50
|
-
}))
|
|
50
|
+
}));
|
package/locale/fa.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.fa = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
|
|
45
45
|
return fa;
|
|
46
46
|
|
|
47
|
-
}))
|
|
47
|
+
}));
|
package/locale/fr.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.fr = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
|
|
29
29
|
return fr;
|
|
30
30
|
|
|
31
|
-
}))
|
|
31
|
+
}));
|
package/locale/hi.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.hi = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -55,4 +55,4 @@
|
|
|
55
55
|
|
|
56
56
|
return hi;
|
|
57
57
|
|
|
58
|
-
}))
|
|
58
|
+
}));
|
package/locale/hu.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.hu = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
|
|
29
29
|
return hu;
|
|
30
30
|
|
|
31
|
-
}))
|
|
31
|
+
}));
|
package/locale/id.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.id = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
|
|
52
52
|
return id;
|
|
53
53
|
|
|
54
|
-
}))
|
|
54
|
+
}));
|
package/locale/it.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.it = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
|
|
29
29
|
return it;
|
|
30
30
|
|
|
31
|
-
}))
|
|
31
|
+
}));
|
package/locale/ja.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.ja = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
|
|
37
37
|
return ja;
|
|
38
38
|
|
|
39
|
-
}))
|
|
39
|
+
}));
|
package/locale/jv.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.jv = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
|
|
52
52
|
return jv;
|
|
53
53
|
|
|
54
|
-
}))
|
|
54
|
+
}));
|
package/locale/ko.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.ko = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
|
|
29
29
|
return ko;
|
|
30
30
|
|
|
31
|
-
}))
|
|
31
|
+
}));
|
package/locale/my.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.my = factory()));
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @preserve date-and-time.js locale configuration
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
|
|
44
44
|
return my;
|
|
45
45
|
|
|
46
|
-
}))
|
|
46
|
+
}));
|