chronos-date 1.0.1 → 1.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.
Files changed (102) hide show
  1. package/dist/basic-DIp_pxR2.cjs +450 -0
  2. package/dist/basic-Dputob9z.mjs +366 -0
  3. package/dist/constants.cjs +27 -1
  4. package/dist/constants.mjs +5 -1
  5. package/dist/convert-CNVL-mop.mjs +22 -0
  6. package/dist/convert-dQuGWhVm.cjs +33 -0
  7. package/dist/greet-B8ZtypgG.cjs +40 -0
  8. package/dist/greet-B9j4afzD.mjs +35 -0
  9. package/dist/guards.cjs +119 -1
  10. package/dist/guards.mjs +110 -1
  11. package/dist/helpers-CrMc9iJZ.mjs +185 -0
  12. package/dist/helpers-M_SfAbAv.cjs +262 -0
  13. package/dist/index.cjs +1461 -1
  14. package/dist/index.mjs +1458 -1
  15. package/dist/non-primitives-CT4vszrX.cjs +52 -0
  16. package/dist/non-primitives-DrQfPj1r.mjs +22 -0
  17. package/dist/plugins/banglaPlugin.cjs +121 -1
  18. package/dist/plugins/banglaPlugin.d.cts +1 -1
  19. package/dist/plugins/banglaPlugin.d.mts +1 -1
  20. package/dist/plugins/banglaPlugin.mjs +120 -1
  21. package/dist/plugins/businessPlugin.cjs +118 -1
  22. package/dist/plugins/businessPlugin.d.cts +1 -1
  23. package/dist/plugins/businessPlugin.d.mts +1 -1
  24. package/dist/plugins/businessPlugin.mjs +117 -1
  25. package/dist/plugins/dateRangePlugin.cjs +46 -1
  26. package/dist/plugins/dateRangePlugin.d.cts +1 -1
  27. package/dist/plugins/dateRangePlugin.d.mts +1 -1
  28. package/dist/plugins/dateRangePlugin.mjs +45 -1
  29. package/dist/plugins/dayPartPlugin.cjs +26 -1
  30. package/dist/plugins/dayPartPlugin.d.cts +1 -1
  31. package/dist/plugins/dayPartPlugin.d.mts +1 -1
  32. package/dist/plugins/dayPartPlugin.mjs +25 -1
  33. package/dist/plugins/durationPlugin.cjs +91 -1
  34. package/dist/plugins/durationPlugin.d.cts +1 -1
  35. package/dist/plugins/durationPlugin.d.mts +1 -1
  36. package/dist/plugins/durationPlugin.mjs +90 -1
  37. package/dist/plugins/fromNowPlugin.cjs +80 -1
  38. package/dist/plugins/fromNowPlugin.d.cts +1 -1
  39. package/dist/plugins/fromNowPlugin.d.mts +1 -1
  40. package/dist/plugins/fromNowPlugin.mjs +79 -1
  41. package/dist/plugins/greetingPlugin.cjs +19 -1
  42. package/dist/plugins/greetingPlugin.d.cts +1 -1
  43. package/dist/plugins/greetingPlugin.d.mts +1 -1
  44. package/dist/plugins/greetingPlugin.mjs +18 -1
  45. package/dist/plugins/palindromePlugin.cjs +22 -1
  46. package/dist/plugins/palindromePlugin.d.cts +1 -1
  47. package/dist/plugins/palindromePlugin.d.mts +1 -1
  48. package/dist/plugins/palindromePlugin.mjs +21 -1
  49. package/dist/plugins/relativeTimePlugin.cjs +74 -1
  50. package/dist/plugins/relativeTimePlugin.d.cts +1 -1
  51. package/dist/plugins/relativeTimePlugin.d.mts +1 -1
  52. package/dist/plugins/relativeTimePlugin.mjs +73 -1
  53. package/dist/plugins/roundPlugin.cjs +69 -1
  54. package/dist/plugins/roundPlugin.d.cts +1 -1
  55. package/dist/plugins/roundPlugin.d.mts +1 -1
  56. package/dist/plugins/roundPlugin.mjs +68 -1
  57. package/dist/plugins/seasonPlugin.cjs +31 -1
  58. package/dist/plugins/seasonPlugin.d.cts +1 -1
  59. package/dist/plugins/seasonPlugin.d.mts +1 -1
  60. package/dist/plugins/seasonPlugin.mjs +30 -1
  61. package/dist/plugins/timeZonePlugin.cjs +139 -1
  62. package/dist/plugins/timeZonePlugin.d.cts +1 -1
  63. package/dist/plugins/timeZonePlugin.d.mts +1 -1
  64. package/dist/plugins/timeZonePlugin.mjs +138 -1
  65. package/dist/plugins/zodiacPlugin.cjs +51 -1
  66. package/dist/plugins/zodiacPlugin.d.cts +1 -1
  67. package/dist/plugins/zodiacPlugin.d.mts +1 -1
  68. package/dist/plugins/zodiacPlugin.mjs +50 -1
  69. package/dist/primitives-BME3_QrA.cjs +49 -0
  70. package/dist/primitives-DEt6I7Sy.mjs +19 -0
  71. package/dist/seasons-CHnjrIKK.mjs +352 -0
  72. package/dist/seasons-CcZicoe1.cjs +418 -0
  73. package/dist/timezone-BfBXeMK_.mjs +5573 -0
  74. package/dist/timezone-DYVJJYKz.cjs +5609 -0
  75. package/dist/types.mjs +1 -1
  76. package/dist/utilities-BU4MSYS7.mjs +43 -0
  77. package/dist/utilities-CGL7F6R9.cjs +72 -0
  78. package/dist/utilities-CtOZhIYv.mjs +241 -0
  79. package/dist/utilities-bXwTPJaD.cjs +318 -0
  80. package/dist/utils.cjs +76 -1
  81. package/dist/utils.mjs +44 -1
  82. package/package.json +1 -1
  83. package/dist/basic-CKxaRSHQ.cjs +0 -1
  84. package/dist/basic-e46DaNAi.mjs +0 -1
  85. package/dist/convert-Bmp63ats.mjs +0 -1
  86. package/dist/convert-DrLrcgqz.cjs +0 -1
  87. package/dist/greet-BBsrvmkn.mjs +0 -1
  88. package/dist/greet-C-6mruI9.cjs +0 -1
  89. package/dist/helpers-DGzYnP81.cjs +0 -1
  90. package/dist/helpers-N1X_Rj_V.mjs +0 -1
  91. package/dist/non-primitives-B2EE6D6s.mjs +0 -1
  92. package/dist/non-primitives-Bu3a4WL4.cjs +0 -1
  93. package/dist/primitives-Cxss_JVF.mjs +0 -1
  94. package/dist/primitives-Db2FUp4e.cjs +0 -1
  95. package/dist/seasons-ChAIVphi.mjs +0 -1
  96. package/dist/seasons-oABOhHcX.cjs +0 -1
  97. package/dist/timezone-B10UItNO.mjs +0 -1
  98. package/dist/timezone-CWxbK_7I.cjs +0 -1
  99. package/dist/utilities-B8dOAQVD.cjs +0 -1
  100. package/dist/utilities-BJE06bms.mjs +0 -1
  101. package/dist/utilities-D2-p26DX.cjs +0 -1
  102. package/dist/utilities-DV_ohS37.mjs +0 -1
@@ -0,0 +1,418 @@
1
+
2
+ //#region src/constants/seasons.ts
3
+ /** Western Seasons */
4
+ const DEFAULT_SEASONS = /* @__PURE__ */ Object.freeze([
5
+ {
6
+ name: "Spring",
7
+ boundary: {
8
+ startMonth: 2,
9
+ endMonth: 4
10
+ }
11
+ },
12
+ {
13
+ name: "Summer",
14
+ boundary: {
15
+ startMonth: 5,
16
+ endMonth: 7
17
+ }
18
+ },
19
+ {
20
+ name: "Autumn",
21
+ boundary: {
22
+ startMonth: 8,
23
+ endMonth: 10
24
+ }
25
+ },
26
+ {
27
+ name: "Winter",
28
+ boundary: {
29
+ startMonth: 11,
30
+ endMonth: 1
31
+ }
32
+ }
33
+ ]);
34
+ /**Default Bangladeshi Seasons */
35
+ const BANGLADESH_SEASONS = /* @__PURE__ */ Object.freeze([
36
+ {
37
+ name: "Grisma (Summer)",
38
+ boundary: {
39
+ startDate: "04-15",
40
+ endDate: "06-14"
41
+ }
42
+ },
43
+ {
44
+ name: "Barsa (Monsoon)",
45
+ boundary: {
46
+ startDate: "06-15",
47
+ endDate: "08-14"
48
+ }
49
+ },
50
+ {
51
+ name: "Sarat (Autumn)",
52
+ boundary: {
53
+ startDate: "08-15",
54
+ endDate: "10-14"
55
+ }
56
+ },
57
+ {
58
+ name: "Hemanta (Late-Autumn)",
59
+ boundary: {
60
+ startDate: "10-15",
61
+ endDate: "12-14"
62
+ }
63
+ },
64
+ {
65
+ name: "Shhit (Winter)",
66
+ boundary: {
67
+ startDate: "12-15",
68
+ endDate: "02-14"
69
+ }
70
+ },
71
+ {
72
+ name: "Basanta (Spring)",
73
+ boundary: {
74
+ startDate: "02-15",
75
+ endDate: "04-14"
76
+ }
77
+ }
78
+ ]);
79
+ /** Indian Seasons */
80
+ const INDIA_IMD_SEASONS = /* @__PURE__ */ Object.freeze([
81
+ {
82
+ name: "Winter",
83
+ boundary: {
84
+ startMonth: 0,
85
+ endMonth: 1
86
+ }
87
+ },
88
+ {
89
+ name: "Pre-Monsoon",
90
+ boundary: {
91
+ startMonth: 2,
92
+ endMonth: 4
93
+ }
94
+ },
95
+ {
96
+ name: "Monsoon",
97
+ boundary: {
98
+ startMonth: 5,
99
+ endMonth: 8
100
+ }
101
+ },
102
+ {
103
+ name: "Post-Monsoon",
104
+ boundary: {
105
+ startMonth: 9,
106
+ endMonth: 10
107
+ }
108
+ },
109
+ {
110
+ name: "Cool Season",
111
+ boundary: {
112
+ startMonth: 11,
113
+ endMonth: 11
114
+ }
115
+ }
116
+ ]);
117
+ /** Indian Vedic Seasons */
118
+ const INDIA_VEDIC_SEASONS = /* @__PURE__ */ Object.freeze([
119
+ {
120
+ name: "Shishir (Winter)",
121
+ boundary: {
122
+ startDate: "12-15",
123
+ endDate: "02-14"
124
+ }
125
+ },
126
+ {
127
+ name: "Vasanta (Spring)",
128
+ boundary: {
129
+ startDate: "02-15",
130
+ endDate: "04-14"
131
+ }
132
+ },
133
+ {
134
+ name: "Grishma (Summer)",
135
+ boundary: {
136
+ startDate: "04-15",
137
+ endDate: "06-14"
138
+ }
139
+ },
140
+ {
141
+ name: "Varsha (Monsoon)",
142
+ boundary: {
143
+ startDate: "06-15",
144
+ endDate: "08-14"
145
+ }
146
+ },
147
+ {
148
+ name: "Sharad (Autumn)",
149
+ boundary: {
150
+ startDate: "08-15",
151
+ endDate: "10-14"
152
+ }
153
+ },
154
+ {
155
+ name: "Hemant (Late-Autumn)",
156
+ boundary: {
157
+ startDate: "10-15",
158
+ endDate: "12-14"
159
+ }
160
+ }
161
+ ]);
162
+ /** Indian Tamil Seasons */
163
+ const INDIA_TAMIL_SEASONS = /* @__PURE__ */ Object.freeze([
164
+ {
165
+ name: "Ilavenil (Mid-Summer)",
166
+ boundary: {
167
+ startMonth: 4,
168
+ endMonth: 5
169
+ }
170
+ },
171
+ {
172
+ name: "Mutuvenil (Peak-Summer)",
173
+ boundary: {
174
+ startMonth: 6,
175
+ endMonth: 7
176
+ }
177
+ },
178
+ {
179
+ name: "Kaar (Monsoon)",
180
+ boundary: {
181
+ startMonth: 7,
182
+ endMonth: 9
183
+ }
184
+ },
185
+ {
186
+ name: "Koothir (Autumn)",
187
+ boundary: {
188
+ startMonth: 9,
189
+ endMonth: 10
190
+ }
191
+ },
192
+ {
193
+ name: "Munpani (Early-Winter)",
194
+ boundary: {
195
+ startMonth: 10,
196
+ endMonth: 0
197
+ }
198
+ },
199
+ {
200
+ name: "Pinpani (Late-Winter)",
201
+ boundary: {
202
+ startMonth: 0,
203
+ endMonth: 2
204
+ }
205
+ }
206
+ ]);
207
+ /** Philippines Seasons */
208
+ const PHILIPPINES_SEASONS = /* @__PURE__ */ Object.freeze([{
209
+ name: "Dry Season",
210
+ boundary: {
211
+ startMonth: 11,
212
+ endMonth: 4
213
+ }
214
+ }, {
215
+ name: "Wet Season",
216
+ boundary: {
217
+ startMonth: 5,
218
+ endMonth: 10
219
+ }
220
+ }]);
221
+ /** US Academic Seasons */
222
+ const US_ACADEMIC_SEASONS = /* @__PURE__ */ Object.freeze([
223
+ {
224
+ name: "Spring",
225
+ boundary: {
226
+ startDate: "01-10",
227
+ endDate: "05-15"
228
+ }
229
+ },
230
+ {
231
+ name: "Summer",
232
+ boundary: {
233
+ startDate: "05-16",
234
+ endDate: "08-15"
235
+ }
236
+ },
237
+ {
238
+ name: "Fall",
239
+ boundary: {
240
+ startDate: "08-16",
241
+ endDate: "12-20"
242
+ }
243
+ },
244
+ {
245
+ name: "Winter Break",
246
+ boundary: {
247
+ startDate: "12-21",
248
+ endDate: "01-09"
249
+ }
250
+ }
251
+ ]);
252
+ /** Japanese Seasons */
253
+ const JAPAN_SEASONS = /* @__PURE__ */ Object.freeze([
254
+ {
255
+ name: "Haru (Spring)",
256
+ boundary: {
257
+ startDate: "03-01",
258
+ endDate: "05-31"
259
+ }
260
+ },
261
+ {
262
+ name: "Natsu (Summer)",
263
+ boundary: {
264
+ startDate: "06-01",
265
+ endDate: "08-31"
266
+ }
267
+ },
268
+ {
269
+ name: "Aki (Autumn)",
270
+ boundary: {
271
+ startDate: "09-01",
272
+ endDate: "11-30"
273
+ }
274
+ },
275
+ {
276
+ name: "Fuyu (Winter)",
277
+ boundary: {
278
+ startDate: "12-01",
279
+ endDate: "02-28"
280
+ }
281
+ }
282
+ ]);
283
+ /** Australian Seasons */
284
+ const AUSTRALIA_SEASONS = /* @__PURE__ */ Object.freeze([
285
+ {
286
+ name: "Summer",
287
+ boundary: {
288
+ startMonth: 11,
289
+ endMonth: 1
290
+ }
291
+ },
292
+ {
293
+ name: "Autumn",
294
+ boundary: {
295
+ startMonth: 2,
296
+ endMonth: 4
297
+ }
298
+ },
299
+ {
300
+ name: "Winter",
301
+ boundary: {
302
+ startMonth: 5,
303
+ endMonth: 7
304
+ }
305
+ },
306
+ {
307
+ name: "Spring",
308
+ boundary: {
309
+ startMonth: 8,
310
+ endMonth: 10
311
+ }
312
+ }
313
+ ]);
314
+ /** Ethiopian Seasons */
315
+ const ETHIOPIA_SEASONS = /* @__PURE__ */ Object.freeze([
316
+ {
317
+ name: "Bega (Dry)",
318
+ boundary: {
319
+ startMonth: 10,
320
+ endMonth: 1
321
+ }
322
+ },
323
+ {
324
+ name: "Belg (Short Rain)",
325
+ boundary: {
326
+ startMonth: 2,
327
+ endMonth: 4
328
+ }
329
+ },
330
+ {
331
+ name: "Kiremt (Main Rain)",
332
+ boundary: {
333
+ startMonth: 5,
334
+ endMonth: 9
335
+ }
336
+ }
337
+ ]);
338
+ /** All the Season Presets for `new Chronos.season()` method */
339
+ const SEASON_PRESETS = /* @__PURE__ */ Object.freeze({
340
+ default: DEFAULT_SEASONS,
341
+ bangladesh: BANGLADESH_SEASONS,
342
+ india: INDIA_IMD_SEASONS,
343
+ tamil: INDIA_TAMIL_SEASONS,
344
+ vedic: INDIA_VEDIC_SEASONS,
345
+ philippines: PHILIPPINES_SEASONS,
346
+ academic_us: US_ACADEMIC_SEASONS,
347
+ japan: JAPAN_SEASONS,
348
+ australia: AUSTRALIA_SEASONS,
349
+ ethiopia: ETHIOPIA_SEASONS
350
+ });
351
+
352
+ //#endregion
353
+ Object.defineProperty(exports, 'AUSTRALIA_SEASONS', {
354
+ enumerable: true,
355
+ get: function () {
356
+ return AUSTRALIA_SEASONS;
357
+ }
358
+ });
359
+ Object.defineProperty(exports, 'BANGLADESH_SEASONS', {
360
+ enumerable: true,
361
+ get: function () {
362
+ return BANGLADESH_SEASONS;
363
+ }
364
+ });
365
+ Object.defineProperty(exports, 'DEFAULT_SEASONS', {
366
+ enumerable: true,
367
+ get: function () {
368
+ return DEFAULT_SEASONS;
369
+ }
370
+ });
371
+ Object.defineProperty(exports, 'ETHIOPIA_SEASONS', {
372
+ enumerable: true,
373
+ get: function () {
374
+ return ETHIOPIA_SEASONS;
375
+ }
376
+ });
377
+ Object.defineProperty(exports, 'INDIA_IMD_SEASONS', {
378
+ enumerable: true,
379
+ get: function () {
380
+ return INDIA_IMD_SEASONS;
381
+ }
382
+ });
383
+ Object.defineProperty(exports, 'INDIA_TAMIL_SEASONS', {
384
+ enumerable: true,
385
+ get: function () {
386
+ return INDIA_TAMIL_SEASONS;
387
+ }
388
+ });
389
+ Object.defineProperty(exports, 'INDIA_VEDIC_SEASONS', {
390
+ enumerable: true,
391
+ get: function () {
392
+ return INDIA_VEDIC_SEASONS;
393
+ }
394
+ });
395
+ Object.defineProperty(exports, 'JAPAN_SEASONS', {
396
+ enumerable: true,
397
+ get: function () {
398
+ return JAPAN_SEASONS;
399
+ }
400
+ });
401
+ Object.defineProperty(exports, 'PHILIPPINES_SEASONS', {
402
+ enumerable: true,
403
+ get: function () {
404
+ return PHILIPPINES_SEASONS;
405
+ }
406
+ });
407
+ Object.defineProperty(exports, 'SEASON_PRESETS', {
408
+ enumerable: true,
409
+ get: function () {
410
+ return SEASON_PRESETS;
411
+ }
412
+ });
413
+ Object.defineProperty(exports, 'US_ACADEMIC_SEASONS', {
414
+ enumerable: true,
415
+ get: function () {
416
+ return US_ACADEMIC_SEASONS;
417
+ }
418
+ });