@thi.ng/date 2.7.40 → 2.7.42
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/CHANGELOG.md +3 -238
- package/README.md +1 -1
- package/package.json +6 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2025-01-
|
|
3
|
+
- **Last updated**: 2025-01-29T16:25:48Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
7
|
+
Only versions published since **2022-01-01** are listed here.
|
|
8
|
+
Please consult the Git history for older version information.
|
|
7
9
|
See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
|
|
8
10
|
|
|
9
11
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
@@ -77,240 +79,3 @@ and/or version bumps of transitive dependencies.
|
|
|
77
79
|
#### ♻️ Refactoring
|
|
78
80
|
|
|
79
81
|
- replace deprecated .substr() w/ .substring() ([0710509](https://github.com/thi-ng/umbrella/commit/0710509))
|
|
80
|
-
|
|
81
|
-
## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@2.1.0) (2021-11-17)
|
|
82
|
-
|
|
83
|
-
#### 🚀 Features
|
|
84
|
-
|
|
85
|
-
- Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
|
|
86
|
-
Improving the overall build ergonomics
|
|
87
|
-
- introduced a tools workspaces
|
|
88
|
-
- imported it in all needed packages/examples
|
|
89
|
-
- inclusive project root
|
|
90
|
-
|
|
91
|
-
#### ♻️ Refactoring
|
|
92
|
-
|
|
93
|
-
- testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
|
|
94
|
-
this commit reverts (partly) changes made in:
|
|
95
|
-
ef346d7a8753590dc9094108a3d861a8dbd5dd2c
|
|
96
|
-
overall purpose is better testament ergonomics:
|
|
97
|
-
instead of having to pass NODE_OPTIONS with every invocation
|
|
98
|
-
having a binary to handle this for us.
|
|
99
|
-
|
|
100
|
-
### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@2.0.1) (2021-10-13)
|
|
101
|
-
|
|
102
|
-
#### ♻️ Refactoring
|
|
103
|
-
|
|
104
|
-
- update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
|
|
105
|
-
- add .js suffix for all relative imports
|
|
106
|
-
- update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
|
|
107
|
-
|
|
108
|
-
# [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@2.0.0) (2021-10-12)
|
|
109
|
-
|
|
110
|
-
#### 🛑 Breaking changes
|
|
111
|
-
|
|
112
|
-
- major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
|
|
113
|
-
- BREAKING CHANGE: discontinue CommonJS & UMD versions
|
|
114
|
-
- only ESM modules will be published from now on
|
|
115
|
-
- CJS obsolete due to ESM support in recent versions of node:
|
|
116
|
-
- i.e. launch NodeJS via:
|
|
117
|
-
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
118
|
-
- in the node REPL use `await import(...)` instead of `require()`
|
|
119
|
-
- UMD obsolete due to widespread browser support for ESM
|
|
120
|
-
Also:
|
|
121
|
-
- normalize/restructure/reorg all package.json files
|
|
122
|
-
- cleanup all build scripts, remove obsolete
|
|
123
|
-
- switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
|
|
124
|
-
|
|
125
|
-
#### ♻️ Refactoring
|
|
126
|
-
|
|
127
|
-
- update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
|
|
128
|
-
- update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
|
|
129
|
-
- update imports ([6d4be5a](https://github.com/thi-ng/umbrella/commit/6d4be5a))
|
|
130
|
-
- restructure source files ([fcb3f3d](https://github.com/thi-ng/umbrella/commit/fcb3f3d))
|
|
131
|
-
- rename internals ([8ee94b1](https://github.com/thi-ng/umbrella/commit/8ee94b1))
|
|
132
|
-
|
|
133
|
-
### [1.0.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@1.0.4) (2021-08-09)
|
|
134
|
-
|
|
135
|
-
#### 🩹 Bug fixes
|
|
136
|
-
|
|
137
|
-
- update i18n init, withLocale() err handling ([9f68bdf](https://github.com/thi-ng/umbrella/commit/9f68bdf))
|
|
138
|
-
- add internal/pure prepLocale() helper due to init issue in ESM env
|
|
139
|
-
- add error handling for withLocale()
|
|
140
|
-
|
|
141
|
-
## [0.9.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.9.0) (2021-08-04)
|
|
142
|
-
|
|
143
|
-
#### 🚀 Features
|
|
144
|
-
|
|
145
|
-
- add/update i18n functions, rel. format ([144a02d](https://github.com/thi-ng/umbrella/commit/144a02d))
|
|
146
|
-
- add weekdayNames(), monthNames()
|
|
147
|
-
- add units(), unitsLessThan(), tense()
|
|
148
|
-
- fix/update locales, add support for dativ forms (singular/plural)
|
|
149
|
-
- add doc strings
|
|
150
|
-
- add tests
|
|
151
|
-
|
|
152
|
-
## [0.8.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.8.0) (2021-07-27)
|
|
153
|
-
|
|
154
|
-
#### 🚀 Features
|
|
155
|
-
|
|
156
|
-
- add/update constants ([2b28839](https://github.com/thi-ng/umbrella/commit/2b28839))
|
|
157
|
-
- major update DateTime methods, fixes ([9268573](https://github.com/thi-ng/umbrella/commit/9268573))
|
|
158
|
-
- add/extend types (MaybeDate, Period, RoundingFn)
|
|
159
|
-
- update various fns & methods to accept MaybeDate args
|
|
160
|
-
- update all rounding fns
|
|
161
|
-
- add/update/fix DateTime methods:
|
|
162
|
-
- set()
|
|
163
|
-
- copy()
|
|
164
|
-
- withPrecision() / setPrecision()
|
|
165
|
-
- isBefore() / isAfter()
|
|
166
|
-
- add()
|
|
167
|
-
- toISOString()
|
|
168
|
-
- valueOf()
|
|
169
|
-
- update return value for inc/decWeek() methods (week number)
|
|
170
|
-
- add ensureDateTime(), ensureEpoch()
|
|
171
|
-
- add maybeIsDate()
|
|
172
|
-
- add/update formatters & presets ([3f3d8d0](https://github.com/thi-ng/umbrella/commit/3f3d8d0))
|
|
173
|
-
- add week-in-year formatters
|
|
174
|
-
- update defFormat() to accept MaybeDate arg
|
|
175
|
-
- migrate defTimecode() to sep file
|
|
176
|
-
- add decomposeDuration()
|
|
177
|
-
- update Locale & presets ([50d889d](https://github.com/thi-ng/umbrella/commit/50d889d))
|
|
178
|
-
- add relative date calc & formatting ([3100814](https://github.com/thi-ng/umbrella/commit/3100814))
|
|
179
|
-
- add formatRelative(), formatRelativeParts() (w/ locale support)
|
|
180
|
-
- add decomposeDifference()
|
|
181
|
-
- add support for quarters in parseRelative()
|
|
182
|
-
- add withLocale() helper ([8c9493e](https://github.com/thi-ng/umbrella/commit/8c9493e))
|
|
183
|
-
- update Locale, DateTime.add() ([f20c129](https://github.com/thi-ng/umbrella/commit/f20c129))
|
|
184
|
-
- add Locale.dateTime, update setLocale()
|
|
185
|
-
- add DateTime.toLocaleString()
|
|
186
|
-
- update DateTime.add() to accept all Period units
|
|
187
|
-
- simplify relative()
|
|
188
|
-
- fix/refactor formatters
|
|
189
|
-
- add/update formatters ([56d9b64](https://github.com/thi-ng/umbrella/commit/56d9b64))
|
|
190
|
-
- add `q` (quarter) formatter
|
|
191
|
-
- add `SS` formatter for zero-padded millis
|
|
192
|
-
- add quarter-based rounding fns ([24a7a76](https://github.com/thi-ng/umbrella/commit/24a7a76))
|
|
193
|
-
- update DateTime, iterators, rounding ([7c0652a](https://github.com/thi-ng/umbrella/commit/7c0652a))
|
|
194
|
-
- add DateTime quarter & week readonly props & inc/decQuarter/Week()
|
|
195
|
-
- update defIterator(), add quarters() and weeks() iterators
|
|
196
|
-
- add quarter/week rounding fns
|
|
197
|
-
|
|
198
|
-
#### 🩹 Bug fixes
|
|
199
|
-
|
|
200
|
-
- minor update EN_LONG locale ([a9dcd47](https://github.com/thi-ng/umbrella/commit/a9dcd47))
|
|
201
|
-
|
|
202
|
-
## [0.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.7.0) (2021-07-01)
|
|
203
|
-
|
|
204
|
-
#### 🚀 Features
|
|
205
|
-
|
|
206
|
-
- add/update locales, add separators ([61f34e7](https://github.com/thi-ng/umbrella/commit/61f34e7))
|
|
207
|
-
- add DE_SHORT/LONG, ES_LONG, FR_LONG, IT_LONG locales
|
|
208
|
-
- update `Locale` interface, add separators
|
|
209
|
-
- add `~`/`~~` formatters for referring to locale seperators
|
|
210
|
-
- update/extend locales, format prims ([089a9d4](https://github.com/thi-ng/umbrella/commit/089a9d4))
|
|
211
|
-
- add LocaleSpec type, update setLocale()
|
|
212
|
-
- add new formatters for unpadded/lowercase/separators
|
|
213
|
-
- update all locale presets
|
|
214
|
-
- add new DateTime methods ([a0123cb](https://github.com/thi-ng/umbrella/commit/a0123cb))
|
|
215
|
-
- add .dayInYear()
|
|
216
|
-
- add .weekInYear()
|
|
217
|
-
- extract isLeapYear(), daysInMonth() standalone fns
|
|
218
|
-
- add/update tests
|
|
219
|
-
- add/update epoch rounding fns ([ec3033e](https://github.com/thi-ng/umbrella/commit/ec3033e))
|
|
220
|
-
- add versions for second/minute/hour precisions
|
|
221
|
-
|
|
222
|
-
#### 🩹 Bug fixes
|
|
223
|
-
|
|
224
|
-
- fix UTC handling in formatters ([cab1434](https://github.com/thi-ng/umbrella/commit/cab1434))
|
|
225
|
-
- update tests
|
|
226
|
-
- flip sign in TZ offset formatter (`Z`) ([dc536cb](https://github.com/thi-ng/umbrella/commit/dc536cb))
|
|
227
|
-
|
|
228
|
-
#### ⏱ Performance improvements
|
|
229
|
-
|
|
230
|
-
- refactor dayInYear() as O(1) ([2c2d684](https://github.com/thi-ng/umbrella/commit/2c2d684))
|
|
231
|
-
- add DAYS_IN_MONTH_OFFSET index
|
|
232
|
-
- add tests
|
|
233
|
-
|
|
234
|
-
## [0.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.6.0) (2021-06-08)
|
|
235
|
-
|
|
236
|
-
#### 🚀 Features
|
|
237
|
-
|
|
238
|
-
- extend parseRelative() ([5764ff3](https://github.com/thi-ng/umbrella/commit/5764ff3))
|
|
239
|
-
- add support for weekday names
|
|
240
|
-
- add tests
|
|
241
|
-
|
|
242
|
-
## [0.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.5.0) (2021-04-20)
|
|
243
|
-
|
|
244
|
-
#### 🚀 Features
|
|
245
|
-
|
|
246
|
-
- update relative date parsing ([2491668](https://github.com/thi-ng/umbrella/commit/2491668))
|
|
247
|
-
- add support for signed offset strings
|
|
248
|
-
- add/refactor tests
|
|
249
|
-
- update docs/readme
|
|
250
|
-
|
|
251
|
-
## [0.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.4.0) (2021-03-21)
|
|
252
|
-
|
|
253
|
-
#### 🚀 Features
|
|
254
|
-
|
|
255
|
-
- add date decrement methods ([a52b89e](https://github.com/thi-ng/umbrella/commit/a52b89e))
|
|
256
|
-
- add relative date offset parsing/apply ([5329538](https://github.com/thi-ng/umbrella/commit/5329538))
|
|
257
|
-
- add parseRelative()
|
|
258
|
-
- add relative()
|
|
259
|
-
- update relative date handling ([80d406c](https://github.com/thi-ng/umbrella/commit/80d406c))
|
|
260
|
-
- add `Period` type alias
|
|
261
|
-
- update `parseRelative()`/`relative()` to support milliseconds
|
|
262
|
-
- refactor `parseRelative()` (split up)
|
|
263
|
-
- add tests
|
|
264
|
-
- add interface impls to DateTime ([e3417dd](https://github.com/thi-ng/umbrella/commit/e3417dd))
|
|
265
|
-
- add impls for: `ICompare`, `IEquiv`, `IEqualsDelta`
|
|
266
|
-
- add weeks() iterator ([7ea9d1e](https://github.com/thi-ng/umbrella/commit/7ea9d1e))
|
|
267
|
-
|
|
268
|
-
## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.3.0) (2021-03-21)
|
|
269
|
-
|
|
270
|
-
#### 🚀 Features
|
|
271
|
-
|
|
272
|
-
- add/update formatters ([010e739](https://github.com/thi-ng/umbrella/commit/010e739))
|
|
273
|
-
- add `FMT_ISO_SHORT` preset
|
|
274
|
-
- add `ZZ` partial timezone formatter
|
|
275
|
-
- update `defFormatI()` to support escaping
|
|
276
|
-
- add tests
|
|
277
|
-
|
|
278
|
-
### [0.2.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.2.3) (2020-12-07)
|
|
279
|
-
|
|
280
|
-
#### ♻️ Refactoring
|
|
281
|
-
|
|
282
|
-
- update type-only imports ([4b1eb35](https://github.com/thi-ng/umbrella/commit/4b1eb35))
|
|
283
|
-
|
|
284
|
-
### [0.2.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.2.1) (2020-11-24)
|
|
285
|
-
|
|
286
|
-
#### 🩹 Bug fixes
|
|
287
|
-
|
|
288
|
-
- isLeapYear(), add centennial exceptions, tests ([7de0cd8](https://github.com/thi-ng/umbrella/commit/7de0cd8))
|
|
289
|
-
|
|
290
|
-
## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.2.0) (2020-09-22)
|
|
291
|
-
|
|
292
|
-
#### 🚀 Features
|
|
293
|
-
|
|
294
|
-
- add DateTime, defIterator, add/update iterators ([0e31c69](https://github.com/thi-ng/umbrella/commit/0e31c69))
|
|
295
|
-
- update/fix DateTime ([27c8617](https://github.com/thi-ng/umbrella/commit/27c8617))
|
|
296
|
-
- add date/string/json conversions
|
|
297
|
-
- add/fix leap year handling
|
|
298
|
-
- add dateTime() factory
|
|
299
|
-
- add/update formatters, add locale ([c8e84ad](https://github.com/thi-ng/umbrella/commit/c8e84ad))
|
|
300
|
-
- add LOCALE, setLocale()
|
|
301
|
-
- add EN_SHORT, EN_LONG locales
|
|
302
|
-
- update MMM and E formatters to use locale
|
|
303
|
-
- update defFormat() to accept format fns in addition to strings
|
|
304
|
-
- update/rename preset formatters
|
|
305
|
-
- add defTimecode() formatter ([42753e1](https://github.com/thi-ng/umbrella/commit/42753e1))
|
|
306
|
-
- add iterator arg coercions, refactor, add docs ([1256201](https://github.com/thi-ng/umbrella/commit/1256201))
|
|
307
|
-
|
|
308
|
-
#### 🩹 Bug fixes
|
|
309
|
-
|
|
310
|
-
- update ceilMonth(), add docstrings ([0c6c2cc](https://github.com/thi-ng/umbrella/commit/0c6c2cc))
|
|
311
|
-
|
|
312
|
-
## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.1.0) (2020-09-13)
|
|
313
|
-
|
|
314
|
-
#### 🚀 Features
|
|
315
|
-
|
|
316
|
-
- import as new pkg ([bfe457f](https://github.com/thi-ng/umbrella/commit/bfe457f))
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 201 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/date",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.42",
|
|
4
4
|
"description": "Datetime types, relative dates, math, iterators, composable formatters, locales",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -33,22 +33,20 @@
|
|
|
33
33
|
"build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
|
|
34
34
|
"clean": "bun ../../tools/src/clean-package.ts i18n",
|
|
35
35
|
"doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
|
|
36
|
-
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
37
36
|
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
38
37
|
"pub": "yarn npm publish --access public",
|
|
39
38
|
"test": "bun test",
|
|
40
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
40
|
},
|
|
42
41
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.11.
|
|
44
|
-
"@thi.ng/checks": "^3.6.
|
|
45
|
-
"@thi.ng/strings": "^3.9.
|
|
42
|
+
"@thi.ng/api": "^8.11.19",
|
|
43
|
+
"@thi.ng/checks": "^3.6.22",
|
|
44
|
+
"@thi.ng/strings": "^3.9.4"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
|
-
"@microsoft/api-extractor": "^7.48.1",
|
|
49
47
|
"esbuild": "^0.24.2",
|
|
50
48
|
"typedoc": "^0.27.6",
|
|
51
|
-
"typescript": "^5.7.
|
|
49
|
+
"typescript": "^5.7.3"
|
|
52
50
|
},
|
|
53
51
|
"keywords": [
|
|
54
52
|
"datastructure",
|
|
@@ -136,5 +134,5 @@
|
|
|
136
134
|
"thi.ng": {
|
|
137
135
|
"year": 2020
|
|
138
136
|
},
|
|
139
|
-
"gitHead": "
|
|
137
|
+
"gitHead": "fc1d498e8d4b690db873c30cc594352a804e7a65\n"
|
|
140
138
|
}
|