date-and-time 0.14.2 → 2.0.1

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.
Files changed (133) hide show
  1. package/EXTEND.md +29 -11
  2. package/LOCALE.md +19 -34
  3. package/PLUGINS.md +222 -113
  4. package/README.md +203 -171
  5. package/date-and-time.js +171 -147
  6. package/date-and-time.min.js +14 -14
  7. package/esm/date-and-time.es.js +466 -0
  8. package/esm/date-and-time.es.min.js +17 -0
  9. package/esm/date-and-time.mjs +466 -0
  10. package/esm/locale/ar.es.js +39 -0
  11. package/esm/locale/ar.mjs +39 -0
  12. package/esm/locale/az.es.js +44 -0
  13. package/esm/locale/az.mjs +44 -0
  14. package/esm/locale/bn.es.js +50 -0
  15. package/esm/locale/bn.mjs +50 -0
  16. package/esm/locale/cs.es.js +22 -0
  17. package/esm/locale/cs.mjs +22 -0
  18. package/esm/locale/de.es.js +23 -0
  19. package/esm/locale/de.mjs +23 -0
  20. package/esm/locale/dk.es.js +22 -0
  21. package/esm/locale/dk.mjs +22 -0
  22. package/esm/locale/el.es.js +44 -0
  23. package/esm/locale/el.mjs +44 -0
  24. package/esm/locale/en.es.js +13 -0
  25. package/esm/locale/en.mjs +13 -0
  26. package/esm/locale/es.es.js +42 -0
  27. package/esm/locale/es.mjs +42 -0
  28. package/esm/locale/fa.es.js +39 -0
  29. package/esm/locale/fa.mjs +39 -0
  30. package/esm/locale/fr.es.js +23 -0
  31. package/esm/locale/fr.mjs +23 -0
  32. package/esm/locale/hi.es.js +50 -0
  33. package/esm/locale/hi.mjs +50 -0
  34. package/esm/locale/hu.es.js +23 -0
  35. package/esm/locale/hu.mjs +23 -0
  36. package/esm/locale/id.es.js +46 -0
  37. package/esm/locale/id.mjs +46 -0
  38. package/esm/locale/it.es.js +23 -0
  39. package/esm/locale/it.mjs +23 -0
  40. package/esm/locale/ja.es.js +31 -0
  41. package/esm/locale/ja.mjs +31 -0
  42. package/esm/locale/jv.es.js +46 -0
  43. package/esm/locale/jv.mjs +46 -0
  44. package/esm/locale/ko.es.js +23 -0
  45. package/esm/locale/ko.mjs +23 -0
  46. package/esm/locale/my.es.js +38 -0
  47. package/esm/locale/my.mjs +38 -0
  48. package/esm/locale/nl.es.js +37 -0
  49. package/esm/locale/nl.mjs +37 -0
  50. package/esm/locale/pa-in.es.js +62 -0
  51. package/esm/locale/pa-in.mjs +62 -0
  52. package/esm/locale/pl.es.js +37 -0
  53. package/esm/locale/pl.mjs +37 -0
  54. package/esm/locale/pt.es.js +44 -0
  55. package/esm/locale/pt.mjs +44 -0
  56. package/esm/locale/ro.es.js +22 -0
  57. package/esm/locale/ro.mjs +22 -0
  58. package/esm/locale/ru.es.js +44 -0
  59. package/esm/locale/ru.mjs +44 -0
  60. package/esm/locale/rw.es.js +22 -0
  61. package/esm/locale/rw.mjs +22 -0
  62. package/esm/locale/sr.es.js +22 -0
  63. package/esm/locale/sr.mjs +22 -0
  64. package/esm/locale/th.es.js +23 -0
  65. package/esm/locale/th.mjs +23 -0
  66. package/esm/locale/tr.es.js +22 -0
  67. package/esm/locale/tr.mjs +22 -0
  68. package/esm/locale/uk.es.js +57 -0
  69. package/esm/locale/uk.mjs +57 -0
  70. package/esm/locale/uz.es.js +22 -0
  71. package/esm/locale/uz.mjs +22 -0
  72. package/esm/locale/vi.es.js +23 -0
  73. package/esm/locale/vi.mjs +23 -0
  74. package/esm/locale/zh-cn.es.js +48 -0
  75. package/esm/locale/zh-cn.mjs +48 -0
  76. package/esm/locale/zh-tw.es.js +46 -0
  77. package/esm/locale/zh-tw.mjs +46 -0
  78. package/esm/plugin/day-of-week.es.js +19 -0
  79. package/esm/plugin/day-of-week.mjs +19 -0
  80. package/esm/plugin/meridiem.es.js +47 -0
  81. package/esm/plugin/meridiem.mjs +47 -0
  82. package/esm/plugin/microsecond.es.js +31 -0
  83. package/esm/plugin/microsecond.mjs +31 -0
  84. package/esm/plugin/ordinal.es.js +34 -0
  85. package/esm/plugin/ordinal.mjs +34 -0
  86. package/esm/plugin/timespan.es.js +75 -0
  87. package/esm/plugin/timespan.mjs +75 -0
  88. package/esm/plugin/timezone.es.js +73 -0
  89. package/esm/plugin/timezone.mjs +73 -0
  90. package/esm/plugin/two-digit-year.es.js +21 -0
  91. package/esm/plugin/two-digit-year.mjs +21 -0
  92. package/locale/ar.js +14 -19
  93. package/locale/az.js +14 -19
  94. package/locale/bn.js +14 -19
  95. package/locale/cs.js +14 -19
  96. package/locale/de.js +15 -20
  97. package/locale/dk.js +15 -20
  98. package/locale/el.js +21 -24
  99. package/locale/en.js +17 -19
  100. package/locale/es.js +14 -19
  101. package/locale/fa.js +14 -19
  102. package/locale/fr.js +14 -19
  103. package/locale/hi.js +14 -19
  104. package/locale/hu.js +14 -19
  105. package/locale/id.js +14 -19
  106. package/locale/it.js +14 -19
  107. package/locale/ja.js +14 -19
  108. package/locale/jv.js +14 -19
  109. package/locale/ko.js +14 -19
  110. package/locale/my.js +14 -19
  111. package/locale/nl.js +20 -23
  112. package/locale/pa-in.js +14 -19
  113. package/locale/pl.js +20 -23
  114. package/locale/pt.js +14 -19
  115. package/locale/ro.js +15 -20
  116. package/locale/ru.js +14 -19
  117. package/locale/rw.js +30 -0
  118. package/locale/sr.js +14 -19
  119. package/locale/th.js +14 -19
  120. package/locale/tr.js +14 -19
  121. package/locale/uk.js +23 -26
  122. package/locale/uz.js +14 -19
  123. package/locale/vi.js +14 -19
  124. package/locale/zh-cn.js +14 -19
  125. package/locale/zh-tw.js +14 -19
  126. package/package.json +26 -11
  127. package/plugin/day-of-week.js +13 -14
  128. package/plugin/meridiem.js +32 -24
  129. package/plugin/microsecond.js +14 -15
  130. package/plugin/ordinal.js +13 -14
  131. package/plugin/timespan.js +13 -14
  132. package/plugin/timezone.js +81 -0
  133. package/plugin/two-digit-year.js +13 -19
package/locale/el.js CHANGED
@@ -1,18 +1,24 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Greek (el)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Greek (el)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var el = function (date) {
10
14
  var code = 'el';
11
15
 
12
- date.locale('el', {
16
+ date.locale(code, {
13
17
  res: {
14
- MMMM_nominative: ['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'],
15
- MMMM_genitive: ['Ιανουαρίου', 'Φεβρουαρίου', 'Μαρτίου', 'Απριλίου', 'Μαΐου', 'Ιουνίου', 'Ιουλίου', 'Αυγούστου', 'Σεπτεμβρίου', 'Οκτωβρίου', 'Νοεμβρίου', 'Δεκεμβρίου'],
18
+ MMMM: [
19
+ ['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'],
20
+ ['Ιανουαρίου', 'Φεβρουαρίου', 'Μαρτίου', 'Απριλίου', 'Μαΐου', 'Ιουνίου', 'Ιουλίου', 'Αυγούστου', 'Σεπτεμβρίου', 'Οκτωβρίου', 'Νοεμβρίου', 'Δεκεμβρίου']
21
+ ],
16
22
  MMM: ['Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαϊ', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ'],
17
23
  dddd: ['Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο'],
18
24
  ddd: ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ'],
@@ -21,7 +27,7 @@
21
27
  },
22
28
  formatter: {
23
29
  MMMM: function (d, formatString) {
24
- return this.res['MMMM_' + (/D.*MMMM/.test(formatString) ? 'genitive' : 'nominative')][d.getMonth()];
30
+ return this.res.MMMM[/D.*MMMM/.test(formatString) | 0][d.getMonth()];
25
31
  },
26
32
  hh: function (d) {
27
33
  return ('0' + d.getHours() % 12).slice(-2);
@@ -32,7 +38,7 @@
32
38
  },
33
39
  parser: {
34
40
  MMMM: function (str, formatString) {
35
- var result = this.find(this.res['MMMM_' + (/D.*MMMM/.test(formatString) ? 'genitive' : 'nominative')], str);
41
+ var result = this.find(this.res.MMMM[/D.*MMMM/.test(formatString) | 0], str);
36
42
  result.value++;
37
43
  return result;
38
44
  }
@@ -41,15 +47,6 @@
41
47
  return code;
42
48
  };
43
49
 
44
- if (typeof module === 'object' && typeof module.exports === 'object') {
45
- (module.paths || []).push('./');
46
- module.exports = exec;
47
- // This line will be removed in the next version.
48
- exec(require('date-and-time'));
49
- } else if (typeof define === 'function' && define.amd) {
50
- define(['date-and-time'], exec);
51
- } else {
52
- exec(global.date);
53
- }
50
+ return el;
54
51
 
55
- }(this));
52
+ }));
package/locale/en.js CHANGED
@@ -1,23 +1,21 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Englis (en)
4
- * @preserve This is a dummy module.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function () {
10
- return 'en';
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Englis (en)
10
+ * @preserve This is a dummy module.
11
+ */
12
+
13
+ var en = function (date) {
14
+ var code = 'en';
15
+
16
+ return code;
11
17
  };
12
18
 
13
- if (typeof module === 'object' && typeof module.exports === 'object') {
14
- (module.paths || []).push('./');
15
- module.exports = exec;
16
- exec(require('date-and-time'));
17
- } else if (typeof define === 'function' && define.amd) {
18
- define(['date-and-time'], exec);
19
- } else {
20
- exec(global.date);
21
- }
19
+ return en;
22
20
 
23
- }(this));
21
+ }));
package/locale/es.js CHANGED
@@ -1,12 +1,16 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Spanish (es)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Spanish (es)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var es = function (date) {
10
14
  var code = 'es';
11
15
 
12
16
  date.locale(code, {
@@ -41,15 +45,6 @@
41
45
  return code;
42
46
  };
43
47
 
44
- if (typeof module === 'object' && typeof module.exports === 'object') {
45
- (module.paths || []).push('./');
46
- module.exports = exec;
47
- // This line will be removed in the next version.
48
- exec(require('date-and-time'));
49
- } else if (typeof define === 'function' && define.amd) {
50
- define(['date-and-time'], exec);
51
- } else {
52
- exec(global.date);
53
- }
48
+ return es;
54
49
 
55
- }(this));
50
+ }));
package/locale/fa.js CHANGED
@@ -1,12 +1,16 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Persian (fa)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Persian (fa)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var fa = function (date) {
10
14
  var code = 'fa';
11
15
 
12
16
  date.locale(code, {
@@ -38,15 +42,6 @@
38
42
  return code;
39
43
  };
40
44
 
41
- if (typeof module === 'object' && typeof module.exports === 'object') {
42
- (module.paths || []).push('./');
43
- module.exports = exec;
44
- // This line will be removed in the next version.
45
- exec(require('date-and-time'));
46
- } else if (typeof define === 'function' && define.amd) {
47
- define(['date-and-time'], exec);
48
- } else {
49
- exec(global.date);
50
- }
45
+ return fa;
51
46
 
52
- }(this));
47
+ }));
package/locale/fr.js CHANGED
@@ -1,12 +1,16 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve French (fr)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve French (fr)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var fr = function (date) {
10
14
  var code = 'fr';
11
15
 
12
16
  date.locale(code, {
@@ -22,15 +26,6 @@
22
26
  return code;
23
27
  };
24
28
 
25
- if (typeof module === 'object' && typeof module.exports === 'object') {
26
- (module.paths || []).push('./');
27
- module.exports = exec;
28
- // This line will be removed in the next version.
29
- exec(require('date-and-time'));
30
- } else if (typeof define === 'function' && define.amd) {
31
- define(['date-and-time'], exec);
32
- } else {
33
- exec(global.date);
34
- }
29
+ return fr;
35
30
 
36
- }(this));
31
+ }));
package/locale/hi.js CHANGED
@@ -1,12 +1,16 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Hindi (hi)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Hindi (hi)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var hi = function (date) {
10
14
  var code = 'hi';
11
15
 
12
16
  date.locale(code, {
@@ -49,15 +53,6 @@
49
53
  return code;
50
54
  };
51
55
 
52
- if (typeof module === 'object' && typeof module.exports === 'object') {
53
- (module.paths || []).push('./');
54
- module.exports = exec;
55
- // This line will be removed in the next version.
56
- exec(require('date-and-time'));
57
- } else if (typeof define === 'function' && define.amd) {
58
- define(['date-and-time'], exec);
59
- } else {
60
- exec(global.date);
61
- }
56
+ return hi;
62
57
 
63
- }(this));
58
+ }));
package/locale/hu.js CHANGED
@@ -1,12 +1,16 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Hungarian (hu)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Hungarian (hu)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var hu = function (date) {
10
14
  var code = 'hu';
11
15
 
12
16
  date.locale(code, {
@@ -22,15 +26,6 @@
22
26
  return code;
23
27
  };
24
28
 
25
- if (typeof module === 'object' && typeof module.exports === 'object') {
26
- (module.paths || []).push('./');
27
- module.exports = exec;
28
- // This line will be removed in the next version.
29
- exec(require('date-and-time'));
30
- } else if (typeof define === 'function' && define.amd) {
31
- define(['date-and-time'], exec);
32
- } else {
33
- exec(global.date);
34
- }
29
+ return hu;
35
30
 
36
- }(this));
31
+ }));
package/locale/id.js CHANGED
@@ -1,12 +1,16 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Indonesian (id)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Indonesian (id)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var id = function (date) {
10
14
  var code = 'id';
11
15
 
12
16
  date.locale(code, {
@@ -45,15 +49,6 @@
45
49
  return code;
46
50
  };
47
51
 
48
- if (typeof module === 'object' && typeof module.exports === 'object') {
49
- (module.paths || []).push('./');
50
- module.exports = exec;
51
- // This line will be removed in the next version.
52
- exec(require('date-and-time'));
53
- } else if (typeof define === 'function' && define.amd) {
54
- define(['date-and-time'], exec);
55
- } else {
56
- exec(global.date);
57
- }
52
+ return id;
58
53
 
59
- }(this));
54
+ }));
package/locale/it.js CHANGED
@@ -1,12 +1,16 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Italian (it)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Italian (it)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var it = function (date) {
10
14
  var code = 'it';
11
15
 
12
16
  date.locale(code, {
@@ -22,15 +26,6 @@
22
26
  return code;
23
27
  };
24
28
 
25
- if (typeof module === 'object' && typeof module.exports === 'object') {
26
- (module.paths || []).push('./');
27
- module.exports = exec;
28
- // This line will be removed in the next version.
29
- exec(require('date-and-time'));
30
- } else if (typeof define === 'function' && define.amd) {
31
- define(['date-and-time'], exec);
32
- } else {
33
- exec(global.date);
34
- }
29
+ return it;
35
30
 
36
- }(this));
31
+ }));
package/locale/ja.js CHANGED
@@ -1,12 +1,16 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Japanese (ja)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Japanese (ja)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var ja = function (date) {
10
14
  var code = 'ja';
11
15
 
12
16
  date.locale(code, {
@@ -30,15 +34,6 @@
30
34
  return code;
31
35
  };
32
36
 
33
- if (typeof module === 'object' && typeof module.exports === 'object') {
34
- (module.paths || []).push('./');
35
- module.exports = exec;
36
- // This line will be removed in the next version.
37
- exec(require('date-and-time'));
38
- } else if (typeof define === 'function' && define.amd) {
39
- define(['date-and-time'], exec);
40
- } else {
41
- exec(global.date);
42
- }
37
+ return ja;
43
38
 
44
- }(this));
39
+ }));
package/locale/jv.js CHANGED
@@ -1,12 +1,16 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Javanese (jv)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Javanese (jv)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var jv = function (date) {
10
14
  var code = 'jv';
11
15
 
12
16
  date.locale(code, {
@@ -45,15 +49,6 @@
45
49
  return code;
46
50
  };
47
51
 
48
- if (typeof module === 'object' && typeof module.exports === 'object') {
49
- (module.paths || []).push('./');
50
- module.exports = exec;
51
- // This line will be removed in the next version.
52
- exec(require('date-and-time'));
53
- } else if (typeof define === 'function' && define.amd) {
54
- define(['date-and-time'], exec);
55
- } else {
56
- exec(global.date);
57
- }
52
+ return jv;
58
53
 
59
- }(this));
54
+ }));
package/locale/ko.js CHANGED
@@ -1,12 +1,16 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Korean (ko)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Korean (ko)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var ko = function (date) {
10
14
  var code = 'ko';
11
15
 
12
16
  date.locale(code, {
@@ -22,15 +26,6 @@
22
26
  return code;
23
27
  };
24
28
 
25
- if (typeof module === 'object' && typeof module.exports === 'object') {
26
- (module.paths || []).push('./');
27
- module.exports = exec;
28
- // This line will be removed in the next version.
29
- exec(require('date-and-time'));
30
- } else if (typeof define === 'function' && define.amd) {
31
- define(['date-and-time'], exec);
32
- } else {
33
- exec(global.date);
34
- }
29
+ return ko;
35
30
 
36
- }(this));
31
+ }));
package/locale/my.js CHANGED
@@ -1,12 +1,16 @@
1
- /**
2
- * @preserve date-and-time.js locale configuration
3
- * @preserve Burmese (my)
4
- * @preserve It is using moment.js locale configuration as a reference.
5
- */
6
- (function (global) {
7
- 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
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';
8
6
 
9
- var exec = function (date) {
7
+ /**
8
+ * @preserve date-and-time.js locale configuration
9
+ * @preserve Burmese (my)
10
+ * @preserve It is using moment.js locale configuration as a reference.
11
+ */
12
+
13
+ var my = function (date) {
10
14
  var code = 'my';
11
15
 
12
16
  date.locale(code, {
@@ -37,15 +41,6 @@
37
41
  return code;
38
42
  };
39
43
 
40
- if (typeof module === 'object' && typeof module.exports === 'object') {
41
- (module.paths || []).push('./');
42
- module.exports = exec;
43
- // This line will be removed in the next version.
44
- exec(require('date-and-time'));
45
- } else if (typeof define === 'function' && define.amd) {
46
- define(['date-and-time'], exec);
47
- } else {
48
- exec(global.date);
49
- }
44
+ return my;
50
45
 
51
- }(this));
46
+ }));