@thi.ng/date 2.3.13 → 2.3.15
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 +56 -56
- package/README.md +4 -3
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2022-
|
|
3
|
+
- **Last updated**: 2022-11-23T22:46:54Z
|
|
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.
|
|
@@ -51,9 +51,9 @@ and/or version bumps of transitive dependencies.
|
|
|
51
51
|
|
|
52
52
|
#### ♻️ Refactoring
|
|
53
53
|
|
|
54
|
-
- update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
|
|
55
54
|
- update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
|
|
56
55
|
- add .js suffix for all relative imports
|
|
56
|
+
- update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
|
|
57
57
|
|
|
58
58
|
# [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@2.0.0) (2021-10-12)
|
|
59
59
|
|
|
@@ -74,11 +74,11 @@ and/or version bumps of transitive dependencies.
|
|
|
74
74
|
|
|
75
75
|
#### ♻️ Refactoring
|
|
76
76
|
|
|
77
|
-
- rename internals ([8ee94b1](https://github.com/thi-ng/umbrella/commit/8ee94b1))
|
|
78
|
-
- restructure source files ([fcb3f3d](https://github.com/thi-ng/umbrella/commit/fcb3f3d))
|
|
79
|
-
- update imports ([6d4be5a](https://github.com/thi-ng/umbrella/commit/6d4be5a))
|
|
80
77
|
- update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
|
|
81
78
|
- update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
|
|
79
|
+
- update imports ([6d4be5a](https://github.com/thi-ng/umbrella/commit/6d4be5a))
|
|
80
|
+
- restructure source files ([fcb3f3d](https://github.com/thi-ng/umbrella/commit/fcb3f3d))
|
|
81
|
+
- rename internals ([8ee94b1](https://github.com/thi-ng/umbrella/commit/8ee94b1))
|
|
82
82
|
|
|
83
83
|
### [1.0.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@1.0.4) (2021-08-09)
|
|
84
84
|
|
|
@@ -103,31 +103,7 @@ and/or version bumps of transitive dependencies.
|
|
|
103
103
|
|
|
104
104
|
#### 🚀 Features
|
|
105
105
|
|
|
106
|
-
- update
|
|
107
|
-
- add DateTime quarter & week readonly props & inc/decQuarter/Week()
|
|
108
|
-
- update defIterator(), add quarters() and weeks() iterators
|
|
109
|
-
- add quarter/week rounding fns
|
|
110
|
-
- add quarter-based rounding fns ([24a7a76](https://github.com/thi-ng/umbrella/commit/24a7a76))
|
|
111
|
-
- add/update formatters ([56d9b64](https://github.com/thi-ng/umbrella/commit/56d9b64))
|
|
112
|
-
- add `q` (quarter) formatter
|
|
113
|
-
- add `SS` formatter for zero-padded millis
|
|
114
|
-
- update Locale, DateTime.add() ([f20c129](https://github.com/thi-ng/umbrella/commit/f20c129))
|
|
115
|
-
- add Locale.dateTime, update setLocale()
|
|
116
|
-
- add DateTime.toLocaleString()
|
|
117
|
-
- update DateTime.add() to accept all Period units
|
|
118
|
-
- simplify relative()
|
|
119
|
-
- fix/refactor formatters
|
|
120
|
-
- add withLocale() helper ([8c9493e](https://github.com/thi-ng/umbrella/commit/8c9493e))
|
|
121
|
-
- add relative date calc & formatting ([3100814](https://github.com/thi-ng/umbrella/commit/3100814))
|
|
122
|
-
- add formatRelative(), formatRelativeParts() (w/ locale support)
|
|
123
|
-
- add decomposeDifference()
|
|
124
|
-
- add support for quarters in parseRelative()
|
|
125
|
-
- update Locale & presets ([50d889d](https://github.com/thi-ng/umbrella/commit/50d889d))
|
|
126
|
-
- add/update formatters & presets ([3f3d8d0](https://github.com/thi-ng/umbrella/commit/3f3d8d0))
|
|
127
|
-
- add week-in-year formatters
|
|
128
|
-
- update defFormat() to accept MaybeDate arg
|
|
129
|
-
- migrate defTimecode() to sep file
|
|
130
|
-
- add decomposeDuration()
|
|
106
|
+
- add/update constants ([2b28839](https://github.com/thi-ng/umbrella/commit/2b28839))
|
|
131
107
|
- major update DateTime methods, fixes ([9268573](https://github.com/thi-ng/umbrella/commit/9268573))
|
|
132
108
|
- add/extend types (MaybeDate, Period, RoundingFn)
|
|
133
109
|
- update various fns & methods to accept MaybeDate args
|
|
@@ -143,7 +119,31 @@ and/or version bumps of transitive dependencies.
|
|
|
143
119
|
- update return value for inc/decWeek() methods (week number)
|
|
144
120
|
- add ensureDateTime(), ensureEpoch()
|
|
145
121
|
- add maybeIsDate()
|
|
146
|
-
- add/update
|
|
122
|
+
- add/update formatters & presets ([3f3d8d0](https://github.com/thi-ng/umbrella/commit/3f3d8d0))
|
|
123
|
+
- add week-in-year formatters
|
|
124
|
+
- update defFormat() to accept MaybeDate arg
|
|
125
|
+
- migrate defTimecode() to sep file
|
|
126
|
+
- add decomposeDuration()
|
|
127
|
+
- update Locale & presets ([50d889d](https://github.com/thi-ng/umbrella/commit/50d889d))
|
|
128
|
+
- add relative date calc & formatting ([3100814](https://github.com/thi-ng/umbrella/commit/3100814))
|
|
129
|
+
- add formatRelative(), formatRelativeParts() (w/ locale support)
|
|
130
|
+
- add decomposeDifference()
|
|
131
|
+
- add support for quarters in parseRelative()
|
|
132
|
+
- add withLocale() helper ([8c9493e](https://github.com/thi-ng/umbrella/commit/8c9493e))
|
|
133
|
+
- update Locale, DateTime.add() ([f20c129](https://github.com/thi-ng/umbrella/commit/f20c129))
|
|
134
|
+
- add Locale.dateTime, update setLocale()
|
|
135
|
+
- add DateTime.toLocaleString()
|
|
136
|
+
- update DateTime.add() to accept all Period units
|
|
137
|
+
- simplify relative()
|
|
138
|
+
- fix/refactor formatters
|
|
139
|
+
- add/update formatters ([56d9b64](https://github.com/thi-ng/umbrella/commit/56d9b64))
|
|
140
|
+
- add `q` (quarter) formatter
|
|
141
|
+
- add `SS` formatter for zero-padded millis
|
|
142
|
+
- add quarter-based rounding fns ([24a7a76](https://github.com/thi-ng/umbrella/commit/24a7a76))
|
|
143
|
+
- update DateTime, iterators, rounding ([7c0652a](https://github.com/thi-ng/umbrella/commit/7c0652a))
|
|
144
|
+
- add DateTime quarter & week readonly props & inc/decQuarter/Week()
|
|
145
|
+
- update defIterator(), add quarters() and weeks() iterators
|
|
146
|
+
- add quarter/week rounding fns
|
|
147
147
|
|
|
148
148
|
#### 🩹 Bug fixes
|
|
149
149
|
|
|
@@ -153,27 +153,27 @@ and/or version bumps of transitive dependencies.
|
|
|
153
153
|
|
|
154
154
|
#### 🚀 Features
|
|
155
155
|
|
|
156
|
-
- add/update
|
|
157
|
-
- add
|
|
156
|
+
- add/update locales, add separators ([61f34e7](https://github.com/thi-ng/umbrella/commit/61f34e7))
|
|
157
|
+
- add DE_SHORT/LONG, ES_LONG, FR_LONG, IT_LONG locales
|
|
158
|
+
- update `Locale` interface, add separators
|
|
159
|
+
- add `~`/`~~` formatters for referring to locale seperators
|
|
160
|
+
- update/extend locales, format prims ([089a9d4](https://github.com/thi-ng/umbrella/commit/089a9d4))
|
|
161
|
+
- add LocaleSpec type, update setLocale()
|
|
162
|
+
- add new formatters for unpadded/lowercase/separators
|
|
163
|
+
- update all locale presets
|
|
158
164
|
- add new DateTime methods ([a0123cb](https://github.com/thi-ng/umbrella/commit/a0123cb))
|
|
159
165
|
- add .dayInYear()
|
|
160
166
|
- add .weekInYear()
|
|
161
167
|
- extract isLeapYear(), daysInMonth() standalone fns
|
|
162
168
|
- add/update tests
|
|
163
|
-
- update
|
|
164
|
-
- add
|
|
165
|
-
- add new formatters for unpadded/lowercase/separators
|
|
166
|
-
- update all locale presets
|
|
167
|
-
- add/update locales, add separators ([61f34e7](https://github.com/thi-ng/umbrella/commit/61f34e7))
|
|
168
|
-
- add DE_SHORT/LONG, ES_LONG, FR_LONG, IT_LONG locales
|
|
169
|
-
- update `Locale` interface, add separators
|
|
170
|
-
- add `~`/`~~` formatters for referring to locale seperators
|
|
169
|
+
- add/update epoch rounding fns ([ec3033e](https://github.com/thi-ng/umbrella/commit/ec3033e))
|
|
170
|
+
- add versions for second/minute/hour precisions
|
|
171
171
|
|
|
172
172
|
#### 🩹 Bug fixes
|
|
173
173
|
|
|
174
|
-
- flip sign in TZ offset formatter (`Z`) ([dc536cb](https://github.com/thi-ng/umbrella/commit/dc536cb))
|
|
175
174
|
- fix UTC handling in formatters ([cab1434](https://github.com/thi-ng/umbrella/commit/cab1434))
|
|
176
175
|
- update tests
|
|
176
|
+
- flip sign in TZ offset formatter (`Z`) ([dc536cb](https://github.com/thi-ng/umbrella/commit/dc536cb))
|
|
177
177
|
|
|
178
178
|
#### ⏱ Performance improvements
|
|
179
179
|
|
|
@@ -202,18 +202,18 @@ and/or version bumps of transitive dependencies.
|
|
|
202
202
|
|
|
203
203
|
#### 🚀 Features
|
|
204
204
|
|
|
205
|
-
- add
|
|
206
|
-
- add
|
|
207
|
-
- add
|
|
205
|
+
- add date decrement methods ([a52b89e](https://github.com/thi-ng/umbrella/commit/a52b89e))
|
|
206
|
+
- add relative date offset parsing/apply ([5329538](https://github.com/thi-ng/umbrella/commit/5329538))
|
|
207
|
+
- add parseRelative()
|
|
208
|
+
- add relative()
|
|
208
209
|
- update relative date handling ([80d406c](https://github.com/thi-ng/umbrella/commit/80d406c))
|
|
209
210
|
- add `Period` type alias
|
|
210
211
|
- update `parseRelative()`/`relative()` to support milliseconds
|
|
211
212
|
- refactor `parseRelative()` (split up)
|
|
212
213
|
- add tests
|
|
213
|
-
- add
|
|
214
|
-
- add
|
|
215
|
-
|
|
216
|
-
- add date decrement methods ([a52b89e](https://github.com/thi-ng/umbrella/commit/a52b89e))
|
|
214
|
+
- add interface impls to DateTime ([e3417dd](https://github.com/thi-ng/umbrella/commit/e3417dd))
|
|
215
|
+
- add impls for: `ICompare`, `IEquiv`, `IEqualsDelta`
|
|
216
|
+
- add weeks() iterator ([7ea9d1e](https://github.com/thi-ng/umbrella/commit/7ea9d1e))
|
|
217
217
|
|
|
218
218
|
## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@0.3.0) (2021-03-21)
|
|
219
219
|
|
|
@@ -241,19 +241,19 @@ and/or version bumps of transitive dependencies.
|
|
|
241
241
|
|
|
242
242
|
#### 🚀 Features
|
|
243
243
|
|
|
244
|
-
- add
|
|
245
|
-
-
|
|
244
|
+
- add DateTime, defIterator, add/update iterators ([0e31c69](https://github.com/thi-ng/umbrella/commit/0e31c69))
|
|
245
|
+
- update/fix DateTime ([27c8617](https://github.com/thi-ng/umbrella/commit/27c8617))
|
|
246
|
+
- add date/string/json conversions
|
|
247
|
+
- add/fix leap year handling
|
|
248
|
+
- add dateTime() factory
|
|
246
249
|
- add/update formatters, add locale ([c8e84ad](https://github.com/thi-ng/umbrella/commit/c8e84ad))
|
|
247
250
|
- add LOCALE, setLocale()
|
|
248
251
|
- add EN_SHORT, EN_LONG locales
|
|
249
252
|
- update MMM and E formatters to use locale
|
|
250
253
|
- update defFormat() to accept format fns in addition to strings
|
|
251
254
|
- update/rename preset formatters
|
|
252
|
-
-
|
|
253
|
-
|
|
254
|
-
- add/fix leap year handling
|
|
255
|
-
- add dateTime() factory
|
|
256
|
-
- add DateTime, defIterator, add/update iterators ([0e31c69](https://github.com/thi-ng/umbrella/commit/0e31c69))
|
|
255
|
+
- add defTimecode() formatter ([42753e1](https://github.com/thi-ng/umbrella/commit/42753e1))
|
|
256
|
+
- add iterator arg coercions, refactor, add docs ([1256201](https://github.com/thi-ng/umbrella/commit/1256201))
|
|
257
257
|
|
|
258
258
|
#### 🩹 Bug fixes
|
|
259
259
|
|
package/README.md
CHANGED
|
@@ -76,9 +76,10 @@ directory are using this package.
|
|
|
76
76
|
|
|
77
77
|
A selection:
|
|
78
78
|
|
|
79
|
-
| Screenshot | Description
|
|
80
|
-
|
|
81
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/commit-heatmap.png" width="240"/> | Heatmap visualization of this mono-repo's commits
|
|
79
|
+
| Screenshot | Description | Live demo | Source |
|
|
80
|
+
|:----------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------|:----------------------------------------------------|:----------------------------------------------------------------------------------|
|
|
81
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/commit-heatmap.png" width="240"/> | Heatmap visualization of this mono-repo's commits | | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/commit-heatmap) |
|
|
82
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/zig-todo-list.png" width="240"/> | Zig-based To-Do list, DOM creation, local storage task persistence | [Demo](https://demo.thi.ng/umbrella/zig-todo-list/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/zig-todo-list) |
|
|
82
83
|
|
|
83
84
|
## API
|
|
84
85
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/date",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.15",
|
|
4
4
|
"description": "Datetime types, relative dates, math, iterators, composable formatters, locales",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.4.
|
|
38
|
-
"@thi.ng/checks": "^3.3.
|
|
39
|
-
"@thi.ng/strings": "^3.3.
|
|
37
|
+
"@thi.ng/api": "^8.4.6",
|
|
38
|
+
"@thi.ng/checks": "^3.3.3",
|
|
39
|
+
"@thi.ng/strings": "^3.3.17"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@microsoft/api-extractor": "^7.33.5",
|
|
43
|
-
"@thi.ng/testament": "^0.3.
|
|
43
|
+
"@thi.ng/testament": "^0.3.5",
|
|
44
44
|
"rimraf": "^3.0.2",
|
|
45
45
|
"tools": "^0.0.1",
|
|
46
|
-
"typedoc": "^0.23.
|
|
46
|
+
"typedoc": "^0.23.20",
|
|
47
47
|
"typescript": "^4.8.4"
|
|
48
48
|
},
|
|
49
49
|
"keywords": [
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"node": ">=12.7"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
74
|
-
"
|
|
75
|
-
"
|
|
74
|
+
"./*.js",
|
|
75
|
+
"./*.d.ts",
|
|
76
76
|
"i18n",
|
|
77
77
|
"internal"
|
|
78
78
|
],
|
|
@@ -129,5 +129,5 @@
|
|
|
129
129
|
"thi.ng": {
|
|
130
130
|
"year": 2020
|
|
131
131
|
},
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "044ee6a3895720fc78e115032d4d831b63510929\n"
|
|
133
133
|
}
|