@venizia/ignis-atlas 0.1.1 → 0.1.2-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/dist/corpus/changelogs/2026-10-14-temporal-browser-and-locale.md +61 -0
- package/dist/corpus/changelogs/index.md +1 -0
- package/dist/corpus/releases.json +47 -0
- package/dist/corpus/symbols.json +204 -4
- package/dist/corpus/wiki/extensions/helpers/temporal/index.md +69 -9
- package/package.json +2 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TemporalHelper Runs in Every Browser and Speaks a Locale
|
|
3
|
+
description: "IntlTemporalAdapter needs no Temporal, so TemporalHelper works in every browser. Month and weekday names, 12-hour time, relative time, diff, compare, a non-throwing parse and duration formatting replace what a frontend kept dayjs for."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Changelog - 2026-10-14
|
|
7
|
+
|
|
8
|
+
## TemporalHelper runs in every browser and speaks a locale
|
|
9
|
+
|
|
10
|
+
<Badge type="tip" text="Feature" />
|
|
11
|
+
|
|
12
|
+
**In one line.** A browser app can drop dayjs: `TemporalHelper` now covers names, relative time and comparisons, without needing `Temporal`.
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { TemporalHelper, TemporalUnits } from '@venizia/ignis-helpers/temporal';
|
|
16
|
+
|
|
17
|
+
const temporal = new TemporalHelper({ timeZone: 'Asia/Ho_Chi_Minh', locale: 'vi-VN' });
|
|
18
|
+
|
|
19
|
+
temporal.format({ value: order.createdAt, pattern: 'dddd, D MMMM YYYY hh:mm A' }); // 'Thứ Bảy, 19 Tháng 9 2026 12:00 CH'
|
|
20
|
+
temporal.relative({ value: order.createdAt }); // '3 giờ trước'
|
|
21
|
+
temporal.relative({ value: order.createdAt, unit: TemporalUnits.DAY, numeric: 'auto' }); // 'Hôm qua'
|
|
22
|
+
temporal.diff({ value: end, other: start, unit: TemporalUnits.MONTH }); // whole months
|
|
23
|
+
temporal.tryParse({ value: input }); // a Date, or null
|
|
24
|
+
temporal.formatDuration({ milliseconds: 91_800_000 }); // '1d1h30m'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## What changed
|
|
28
|
+
|
|
29
|
+
Before, the default adapter needed the runtime's `Temporal`, which not every browser ships, and the pattern dialect wrote digits only.
|
|
30
|
+
|
|
31
|
+
**A browser-safe adapter.** `IntlTemporalAdapter` reads offsets through `Intl.DateTimeFormat` alone. It matched `NativeTemporalAdapter` on 240,000 random instants across 12 zones, years 1 to 9999. A helper built without an `adapter` uses `Temporal` where the runtime has it and `IntlTemporalAdapter` everywhere else.
|
|
32
|
+
|
|
33
|
+
**Writing in a locale.** The constructor takes `locale` (default `en-US`); every call can pass its own.
|
|
34
|
+
|
|
35
|
+
| New | What it writes |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `MMMM` / `MMM` | Month name, long / short |
|
|
38
|
+
| `dddd` / `ddd` | Weekday name, long / short |
|
|
39
|
+
| `hh` / `h`, `A` / `a` | 12-hour clock and its AM/PM marker |
|
|
40
|
+
| `L` / `LL` | The date in the locale's numeric order / its long form |
|
|
41
|
+
| `formatIntl({ value, options })` | Any `Intl.DateTimeFormat` options, in the helper's zone |
|
|
42
|
+
|
|
43
|
+
These tokens write only. `parse` stays numeric and strict, and a parse pattern holding one throws a 500.
|
|
44
|
+
|
|
45
|
+
**New methods.**
|
|
46
|
+
|
|
47
|
+
| Method | Answers |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `relative({ value, base, unit, numeric })` | `3 hours ago`, `yesterday`, through `Intl.RelativeTimeFormat`. With a `unit`, it counts the unit's boundaries in the zone |
|
|
50
|
+
| `diff({ value, other, unit })` | Whole units, truncated. The inverse of `add`: `diff(add(x, n), x)` is `n`, outside a zone that skipped a whole day |
|
|
51
|
+
| `compare({ value, other, unit })` | `-1`, `0` or `1`, at a unit's granularity in the zone |
|
|
52
|
+
| `tryParse(...)` / `isValid({ value })` | `null` / `false` where `parse` would throw a 400 |
|
|
53
|
+
| `durationParts({ milliseconds })` / `formatDuration(...)` | `{ days, hours, ... }` / `1d1h30m`, or the locale's unit words |
|
|
54
|
+
|
|
55
|
+
## Who is affected
|
|
56
|
+
|
|
57
|
+
- **A browser app on a runtime without `Temporal`.** `new TemporalHelper()` used to throw; it now works through `Intl`. Nothing to change.
|
|
58
|
+
- **A pattern with `MMM`, `MMMM` or `dddd`.** It used to throw an "unknown token" 500 when formatting; it now writes the name. As a parse pattern it still throws.
|
|
59
|
+
- **Everyone else.** No change. Existing tokens, units, strict parsing and the 1-9999 year range behave as before.
|
|
60
|
+
|
|
61
|
+
**Files:** [`packages/helpers/src/modules/temporal/adapters/intl.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/adapters/intl.ts), [`packages/helpers/src/modules/temporal/locale.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/locale.ts), [`packages/helpers/src/modules/temporal/duration.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/duration.ts), [`packages/helpers/src/modules/temporal/helper.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/helper.ts), [`packages/helpers/src/modules/temporal/tokens.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/tokens.ts)
|
|
@@ -17,6 +17,7 @@ This section tracks the history of significant changes, refactors, and updates t
|
|
|
17
17
|
|
|
18
18
|
| Date | Title | Type |
|
|
19
19
|
|------|-------|------|
|
|
20
|
+
| 2026-10-14 | [TemporalHelper Runs in Every Browser and Speaks a Locale](./2026-10-14-temporal-browser-and-locale) | Feature |
|
|
20
21
|
| 2026-10-11 | [Error Messages Fill Their Placeholders](./2026-10-11-error-message-placeholders) | Enhancement, Behavior Change |
|
|
21
22
|
| 2026-10-09 | [Const Values Stay Literal](./2026-10-09-const-value-literals) | Bug Fix, Breaking Change |
|
|
22
23
|
| 2026-10-07 | [HttpResponseReader Moves Next to the Server Contract](./2026-10-07-response-reader-in-kernel) | Enhancement |
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
],
|
|
14
14
|
"releases": {
|
|
15
15
|
"atlas": [
|
|
16
|
+
{
|
|
17
|
+
"version": "0.1.1",
|
|
18
|
+
"date": "2026-10-12",
|
|
19
|
+
"sha": "30375e1e",
|
|
20
|
+
"order": 1617
|
|
21
|
+
},
|
|
16
22
|
{
|
|
17
23
|
"version": "0.1.1-9",
|
|
18
24
|
"date": "2026-10-12",
|
|
@@ -809,6 +815,12 @@
|
|
|
809
815
|
}
|
|
810
816
|
],
|
|
811
817
|
"connectors": [
|
|
818
|
+
{
|
|
819
|
+
"version": "0.2.2-0",
|
|
820
|
+
"date": "2026-10-14",
|
|
821
|
+
"sha": "abd59b0b",
|
|
822
|
+
"order": 1621
|
|
823
|
+
},
|
|
812
824
|
{
|
|
813
825
|
"version": "0.2.1",
|
|
814
826
|
"date": "2026-10-12",
|
|
@@ -2001,6 +2013,12 @@
|
|
|
2001
2013
|
}
|
|
2002
2014
|
],
|
|
2003
2015
|
"core-server": [
|
|
2016
|
+
{
|
|
2017
|
+
"version": "0.2.2-0",
|
|
2018
|
+
"date": "2026-10-14",
|
|
2019
|
+
"sha": "48f82299",
|
|
2020
|
+
"order": 1623
|
|
2021
|
+
},
|
|
2004
2022
|
{
|
|
2005
2023
|
"version": "0.2.1",
|
|
2006
2024
|
"date": "2026-10-12",
|
|
@@ -2369,6 +2387,12 @@
|
|
|
2369
2387
|
}
|
|
2370
2388
|
],
|
|
2371
2389
|
"core-worker": [
|
|
2390
|
+
{
|
|
2391
|
+
"version": "0.2.2-0",
|
|
2392
|
+
"date": "2026-10-14",
|
|
2393
|
+
"sha": "169144f7",
|
|
2394
|
+
"order": 1622
|
|
2395
|
+
},
|
|
2372
2396
|
{
|
|
2373
2397
|
"version": "0.2.1",
|
|
2374
2398
|
"date": "2026-10-12",
|
|
@@ -3297,6 +3321,12 @@
|
|
|
3297
3321
|
}
|
|
3298
3322
|
],
|
|
3299
3323
|
"helpers": [
|
|
3324
|
+
{
|
|
3325
|
+
"version": "0.2.2-0",
|
|
3326
|
+
"date": "2026-10-14",
|
|
3327
|
+
"sha": "1038c658",
|
|
3328
|
+
"order": 1619
|
|
3329
|
+
},
|
|
3300
3330
|
{
|
|
3301
3331
|
"version": "0.2.1",
|
|
3302
3332
|
"date": "2026-10-12",
|
|
@@ -4393,6 +4423,12 @@
|
|
|
4393
4423
|
}
|
|
4394
4424
|
],
|
|
4395
4425
|
"kernel": [
|
|
4426
|
+
{
|
|
4427
|
+
"version": "0.2.2-0",
|
|
4428
|
+
"date": "2026-10-14",
|
|
4429
|
+
"sha": "1ff784cd",
|
|
4430
|
+
"order": 1620
|
|
4431
|
+
},
|
|
4396
4432
|
{
|
|
4397
4433
|
"version": "0.2.1",
|
|
4398
4434
|
"date": "2026-10-12",
|
|
@@ -4738,6 +4774,17 @@
|
|
|
4738
4774
|
]
|
|
4739
4775
|
},
|
|
4740
4776
|
"changelogs": [
|
|
4777
|
+
{
|
|
4778
|
+
"id": "changelog:2026-10-14-temporal-browser-and-locale",
|
|
4779
|
+
"file": "2026-10-14-temporal-browser-and-locale.md",
|
|
4780
|
+
"date": "2026-10-14",
|
|
4781
|
+
"title": "TemporalHelper Runs in Every Browser and Speaks a Locale",
|
|
4782
|
+
"packages": [
|
|
4783
|
+
"helpers"
|
|
4784
|
+
],
|
|
4785
|
+
"kind": "Feature",
|
|
4786
|
+
"order": 1618
|
|
4787
|
+
},
|
|
4741
4788
|
{
|
|
4742
4789
|
"id": "changelog:2026-10-11-error-message-placeholders",
|
|
4743
4790
|
"file": "2026-10-11-error-message-placeholders.md",
|
package/dist/corpus/symbols.json
CHANGED
|
@@ -1303,6 +1303,16 @@
|
|
|
1303
1303
|
"line": 6,
|
|
1304
1304
|
"signature": "DEFAULT_PAD_END: string"
|
|
1305
1305
|
},
|
|
1306
|
+
{
|
|
1307
|
+
"name": "DEFAULT_TEMPORAL_LOCALE",
|
|
1308
|
+
"package": "@venizia/ignis",
|
|
1309
|
+
"subpath": ".",
|
|
1310
|
+
"specifier": "@venizia/ignis",
|
|
1311
|
+
"kind": "const",
|
|
1312
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
1313
|
+
"line": 39,
|
|
1314
|
+
"signature": "DEFAULT_TEMPORAL_LOCALE = \"en-US\""
|
|
1315
|
+
},
|
|
1306
1316
|
{
|
|
1307
1317
|
"name": "DEFAULT_TEMPORAL_PATTERN",
|
|
1308
1318
|
"package": "@venizia/ignis",
|
|
@@ -3984,6 +3994,16 @@
|
|
|
3984
3994
|
"line": 28,
|
|
3985
3995
|
"signature": "interface ITemporalAdapter"
|
|
3986
3996
|
},
|
|
3997
|
+
{
|
|
3998
|
+
"name": "ITemporalDurationParts",
|
|
3999
|
+
"package": "@venizia/ignis",
|
|
4000
|
+
"subpath": ".",
|
|
4001
|
+
"specifier": "@venizia/ignis",
|
|
4002
|
+
"kind": "interface",
|
|
4003
|
+
"file": "packages/helpers/src/modules/temporal/common/types.ts",
|
|
4004
|
+
"line": 77,
|
|
4005
|
+
"signature": "interface ITemporalDurationParts"
|
|
4006
|
+
},
|
|
3987
4007
|
{
|
|
3988
4008
|
"name": "ITemporalNamespace",
|
|
3989
4009
|
"package": "@venizia/ignis",
|
|
@@ -4324,6 +4344,16 @@
|
|
|
4324
4344
|
"line": 14,
|
|
4325
4345
|
"signature": "InclusionSchema: any"
|
|
4326
4346
|
},
|
|
4347
|
+
{
|
|
4348
|
+
"name": "IntlTemporalAdapter",
|
|
4349
|
+
"package": "@venizia/ignis",
|
|
4350
|
+
"subpath": ".",
|
|
4351
|
+
"specifier": "@venizia/ignis",
|
|
4352
|
+
"kind": "class",
|
|
4353
|
+
"file": "packages/helpers/src/modules/temporal/adapters/intl.ts",
|
|
4354
|
+
"line": 15,
|
|
4355
|
+
"signature": "class IntlTemporalAdapter implements ITemporalAdapter"
|
|
4356
|
+
},
|
|
4327
4357
|
{
|
|
4328
4358
|
"name": "IsolationLevels",
|
|
4329
4359
|
"package": "@venizia/ignis",
|
|
@@ -8035,6 +8065,16 @@
|
|
|
8035
8065
|
"line": 5,
|
|
8036
8066
|
"signature": "type TTask<T> = (...args: any[]) => Promise<T>"
|
|
8037
8067
|
},
|
|
8068
|
+
{
|
|
8069
|
+
"name": "TTemporalDurationStyle",
|
|
8070
|
+
"package": "@venizia/ignis",
|
|
8071
|
+
"subpath": ".",
|
|
8072
|
+
"specifier": "@venizia/ignis",
|
|
8073
|
+
"kind": "type",
|
|
8074
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
8075
|
+
"line": 55,
|
|
8076
|
+
"signature": "type TTemporalDurationStyle = TConstValue<typeof TemporalDurationStyles>"
|
|
8077
|
+
},
|
|
8038
8078
|
{
|
|
8039
8079
|
"name": "TTemporalInput",
|
|
8040
8080
|
"package": "@venizia/ignis",
|
|
@@ -8325,6 +8365,16 @@
|
|
|
8325
8365
|
"line": 6,
|
|
8326
8366
|
"signature": "class TableColumnCache"
|
|
8327
8367
|
},
|
|
8368
|
+
{
|
|
8369
|
+
"name": "TemporalDurationStyles",
|
|
8370
|
+
"package": "@venizia/ignis",
|
|
8371
|
+
"subpath": ".",
|
|
8372
|
+
"specifier": "@venizia/ignis",
|
|
8373
|
+
"kind": "class",
|
|
8374
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
8375
|
+
"line": 42,
|
|
8376
|
+
"signature": "class TemporalDurationStyles"
|
|
8377
|
+
},
|
|
8328
8378
|
{
|
|
8329
8379
|
"name": "TemporalHelper",
|
|
8330
8380
|
"package": "@venizia/ignis",
|
|
@@ -8332,7 +8382,7 @@
|
|
|
8332
8382
|
"specifier": "@venizia/ignis",
|
|
8333
8383
|
"kind": "class",
|
|
8334
8384
|
"file": "packages/helpers/src/modules/temporal/helper.ts",
|
|
8335
|
-
"line":
|
|
8385
|
+
"line": 81,
|
|
8336
8386
|
"signature": "class TemporalHelper extends BaseHelper"
|
|
8337
8387
|
},
|
|
8338
8388
|
{
|
|
@@ -22334,6 +22384,16 @@
|
|
|
22334
22384
|
"line": 6,
|
|
22335
22385
|
"signature": "DEFAULT_PAD_END: string"
|
|
22336
22386
|
},
|
|
22387
|
+
{
|
|
22388
|
+
"name": "DEFAULT_TEMPORAL_LOCALE",
|
|
22389
|
+
"package": "@venizia/ignis-helpers",
|
|
22390
|
+
"subpath": ".",
|
|
22391
|
+
"specifier": "@venizia/ignis-helpers",
|
|
22392
|
+
"kind": "const",
|
|
22393
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
22394
|
+
"line": 39,
|
|
22395
|
+
"signature": "DEFAULT_TEMPORAL_LOCALE = \"en-US\""
|
|
22396
|
+
},
|
|
22337
22397
|
{
|
|
22338
22398
|
"name": "DEFAULT_TEMPORAL_PATTERN",
|
|
22339
22399
|
"package": "@venizia/ignis-helpers",
|
|
@@ -23565,6 +23625,16 @@
|
|
|
23565
23625
|
"line": 28,
|
|
23566
23626
|
"signature": "interface ITemporalAdapter"
|
|
23567
23627
|
},
|
|
23628
|
+
{
|
|
23629
|
+
"name": "ITemporalDurationParts",
|
|
23630
|
+
"package": "@venizia/ignis-helpers",
|
|
23631
|
+
"subpath": ".",
|
|
23632
|
+
"specifier": "@venizia/ignis-helpers",
|
|
23633
|
+
"kind": "interface",
|
|
23634
|
+
"file": "packages/helpers/src/modules/temporal/common/types.ts",
|
|
23635
|
+
"line": 77,
|
|
23636
|
+
"signature": "interface ITemporalDurationParts"
|
|
23637
|
+
},
|
|
23568
23638
|
{
|
|
23569
23639
|
"name": "ITemporalNamespace",
|
|
23570
23640
|
"package": "@venizia/ignis-helpers",
|
|
@@ -23795,6 +23865,16 @@
|
|
|
23795
23865
|
"line": 16,
|
|
23796
23866
|
"signature": "interface IZonedTemporalParts extends ITemporalParts"
|
|
23797
23867
|
},
|
|
23868
|
+
{
|
|
23869
|
+
"name": "IntlTemporalAdapter",
|
|
23870
|
+
"package": "@venizia/ignis-helpers",
|
|
23871
|
+
"subpath": ".",
|
|
23872
|
+
"specifier": "@venizia/ignis-helpers",
|
|
23873
|
+
"kind": "class",
|
|
23874
|
+
"file": "packages/helpers/src/modules/temporal/adapters/intl.ts",
|
|
23875
|
+
"line": 15,
|
|
23876
|
+
"signature": "class IntlTemporalAdapter implements ITemporalAdapter"
|
|
23877
|
+
},
|
|
23798
23878
|
{
|
|
23799
23879
|
"name": "LEADING_OR_TRAILING_HYPHENS_PATTERN",
|
|
23800
23880
|
"package": "@venizia/ignis-helpers",
|
|
@@ -25026,6 +25106,16 @@
|
|
|
25026
25106
|
"line": 5,
|
|
25027
25107
|
"signature": "type TTask<T> = (...args: any[]) => Promise<T>"
|
|
25028
25108
|
},
|
|
25109
|
+
{
|
|
25110
|
+
"name": "TTemporalDurationStyle",
|
|
25111
|
+
"package": "@venizia/ignis-helpers",
|
|
25112
|
+
"subpath": ".",
|
|
25113
|
+
"specifier": "@venizia/ignis-helpers",
|
|
25114
|
+
"kind": "type",
|
|
25115
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
25116
|
+
"line": 55,
|
|
25117
|
+
"signature": "type TTemporalDurationStyle = TConstValue<typeof TemporalDurationStyles>"
|
|
25118
|
+
},
|
|
25029
25119
|
{
|
|
25030
25120
|
"name": "TTemporalInput",
|
|
25031
25121
|
"package": "@venizia/ignis-helpers",
|
|
@@ -25216,6 +25306,16 @@
|
|
|
25216
25306
|
"line": 21,
|
|
25217
25307
|
"signature": "type TWebSocketValidateRoomFn = (opts: { clientId: string; userId?: string; rooms: string[]; }) => ValueOrPromise<string[]>"
|
|
25218
25308
|
},
|
|
25309
|
+
{
|
|
25310
|
+
"name": "TemporalDurationStyles",
|
|
25311
|
+
"package": "@venizia/ignis-helpers",
|
|
25312
|
+
"subpath": ".",
|
|
25313
|
+
"specifier": "@venizia/ignis-helpers",
|
|
25314
|
+
"kind": "class",
|
|
25315
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
25316
|
+
"line": 42,
|
|
25317
|
+
"signature": "class TemporalDurationStyles"
|
|
25318
|
+
},
|
|
25219
25319
|
{
|
|
25220
25320
|
"name": "TemporalHelper",
|
|
25221
25321
|
"package": "@venizia/ignis-helpers",
|
|
@@ -25223,7 +25323,7 @@
|
|
|
25223
25323
|
"specifier": "@venizia/ignis-helpers",
|
|
25224
25324
|
"kind": "class",
|
|
25225
25325
|
"file": "packages/helpers/src/modules/temporal/helper.ts",
|
|
25226
|
-
"line":
|
|
25326
|
+
"line": 81,
|
|
25227
25327
|
"signature": "class TemporalHelper extends BaseHelper"
|
|
25228
25328
|
},
|
|
25229
25329
|
{
|
|
@@ -26876,6 +26976,16 @@
|
|
|
26876
26976
|
"line": 22,
|
|
26877
26977
|
"signature": "class BuildInfoRegistry"
|
|
26878
26978
|
},
|
|
26979
|
+
{
|
|
26980
|
+
"name": "DEFAULT_TEMPORAL_LOCALE",
|
|
26981
|
+
"package": "@venizia/ignis-helpers",
|
|
26982
|
+
"subpath": "./core",
|
|
26983
|
+
"specifier": "@venizia/ignis-helpers/core",
|
|
26984
|
+
"kind": "const",
|
|
26985
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
26986
|
+
"line": 39,
|
|
26987
|
+
"signature": "DEFAULT_TEMPORAL_LOCALE = \"en-US\""
|
|
26988
|
+
},
|
|
26879
26989
|
{
|
|
26880
26990
|
"name": "DEFAULT_TEMPORAL_PATTERN",
|
|
26881
26991
|
"package": "@venizia/ignis-helpers",
|
|
@@ -27286,6 +27396,16 @@
|
|
|
27286
27396
|
"line": 28,
|
|
27287
27397
|
"signature": "interface ITemporalAdapter"
|
|
27288
27398
|
},
|
|
27399
|
+
{
|
|
27400
|
+
"name": "ITemporalDurationParts",
|
|
27401
|
+
"package": "@venizia/ignis-helpers",
|
|
27402
|
+
"subpath": "./core",
|
|
27403
|
+
"specifier": "@venizia/ignis-helpers/core",
|
|
27404
|
+
"kind": "interface",
|
|
27405
|
+
"file": "packages/helpers/src/modules/temporal/common/types.ts",
|
|
27406
|
+
"line": 77,
|
|
27407
|
+
"signature": "interface ITemporalDurationParts"
|
|
27408
|
+
},
|
|
27289
27409
|
{
|
|
27290
27410
|
"name": "ITemporalNamespace",
|
|
27291
27411
|
"package": "@venizia/ignis-helpers",
|
|
@@ -27386,6 +27506,16 @@
|
|
|
27386
27506
|
"line": 16,
|
|
27387
27507
|
"signature": "interface IZonedTemporalParts extends ITemporalParts"
|
|
27388
27508
|
},
|
|
27509
|
+
{
|
|
27510
|
+
"name": "IntlTemporalAdapter",
|
|
27511
|
+
"package": "@venizia/ignis-helpers",
|
|
27512
|
+
"subpath": "./core",
|
|
27513
|
+
"specifier": "@venizia/ignis-helpers/core",
|
|
27514
|
+
"kind": "class",
|
|
27515
|
+
"file": "packages/helpers/src/modules/temporal/adapters/intl.ts",
|
|
27516
|
+
"line": 15,
|
|
27517
|
+
"signature": "class IntlTemporalAdapter implements ITemporalAdapter"
|
|
27518
|
+
},
|
|
27389
27519
|
{
|
|
27390
27520
|
"name": "LogLevels",
|
|
27391
27521
|
"package": "@venizia/ignis-helpers",
|
|
@@ -27786,6 +27916,16 @@
|
|
|
27786
27916
|
"line": 42,
|
|
27787
27917
|
"signature": "type TRetryJitterMode = TConstValue<typeof RetryJitterModes>"
|
|
27788
27918
|
},
|
|
27919
|
+
{
|
|
27920
|
+
"name": "TTemporalDurationStyle",
|
|
27921
|
+
"package": "@venizia/ignis-helpers",
|
|
27922
|
+
"subpath": "./core",
|
|
27923
|
+
"specifier": "@venizia/ignis-helpers/core",
|
|
27924
|
+
"kind": "type",
|
|
27925
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
27926
|
+
"line": 55,
|
|
27927
|
+
"signature": "type TTemporalDurationStyle = TConstValue<typeof TemporalDurationStyles>"
|
|
27928
|
+
},
|
|
27789
27929
|
{
|
|
27790
27930
|
"name": "TTemporalInput",
|
|
27791
27931
|
"package": "@venizia/ignis-helpers",
|
|
@@ -27826,6 +27966,16 @@
|
|
|
27826
27966
|
"line": 14,
|
|
27827
27967
|
"signature": "type TUrlScheme = TConstValue<typeof UrlSchemes>"
|
|
27828
27968
|
},
|
|
27969
|
+
{
|
|
27970
|
+
"name": "TemporalDurationStyles",
|
|
27971
|
+
"package": "@venizia/ignis-helpers",
|
|
27972
|
+
"subpath": "./core",
|
|
27973
|
+
"specifier": "@venizia/ignis-helpers/core",
|
|
27974
|
+
"kind": "class",
|
|
27975
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
27976
|
+
"line": 42,
|
|
27977
|
+
"signature": "class TemporalDurationStyles"
|
|
27978
|
+
},
|
|
27829
27979
|
{
|
|
27830
27980
|
"name": "TemporalHelper",
|
|
27831
27981
|
"package": "@venizia/ignis-helpers",
|
|
@@ -27833,7 +27983,7 @@
|
|
|
27833
27983
|
"specifier": "@venizia/ignis-helpers/core",
|
|
27834
27984
|
"kind": "class",
|
|
27835
27985
|
"file": "packages/helpers/src/modules/temporal/helper.ts",
|
|
27836
|
-
"line":
|
|
27986
|
+
"line": 81,
|
|
27837
27987
|
"signature": "class TemporalHelper extends BaseHelper"
|
|
27838
27988
|
},
|
|
27839
27989
|
{
|
|
@@ -28966,6 +29116,16 @@
|
|
|
28966
29116
|
"line": 7,
|
|
28967
29117
|
"signature": "type TSocketIOValidateRoomFn = (opts: { socket: IOSocket; rooms: string[]; }) => ValueOrPromise<string[]>"
|
|
28968
29118
|
},
|
|
29119
|
+
{
|
|
29120
|
+
"name": "DEFAULT_TEMPORAL_LOCALE",
|
|
29121
|
+
"package": "@venizia/ignis-helpers",
|
|
29122
|
+
"subpath": "./temporal",
|
|
29123
|
+
"specifier": "@venizia/ignis-helpers/temporal",
|
|
29124
|
+
"kind": "const",
|
|
29125
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
29126
|
+
"line": 39,
|
|
29127
|
+
"signature": "DEFAULT_TEMPORAL_LOCALE = \"en-US\""
|
|
29128
|
+
},
|
|
28969
29129
|
{
|
|
28970
29130
|
"name": "DEFAULT_TEMPORAL_PATTERN",
|
|
28971
29131
|
"package": "@venizia/ignis-helpers",
|
|
@@ -29046,6 +29206,16 @@
|
|
|
29046
29206
|
"line": 28,
|
|
29047
29207
|
"signature": "interface ITemporalAdapter"
|
|
29048
29208
|
},
|
|
29209
|
+
{
|
|
29210
|
+
"name": "ITemporalDurationParts",
|
|
29211
|
+
"package": "@venizia/ignis-helpers",
|
|
29212
|
+
"subpath": "./temporal",
|
|
29213
|
+
"specifier": "@venizia/ignis-helpers/temporal",
|
|
29214
|
+
"kind": "interface",
|
|
29215
|
+
"file": "packages/helpers/src/modules/temporal/common/types.ts",
|
|
29216
|
+
"line": 77,
|
|
29217
|
+
"signature": "interface ITemporalDurationParts"
|
|
29218
|
+
},
|
|
29049
29219
|
{
|
|
29050
29220
|
"name": "ITemporalNamespace",
|
|
29051
29221
|
"package": "@venizia/ignis-helpers",
|
|
@@ -29086,6 +29256,16 @@
|
|
|
29086
29256
|
"line": 16,
|
|
29087
29257
|
"signature": "interface IZonedTemporalParts extends ITemporalParts"
|
|
29088
29258
|
},
|
|
29259
|
+
{
|
|
29260
|
+
"name": "IntlTemporalAdapter",
|
|
29261
|
+
"package": "@venizia/ignis-helpers",
|
|
29262
|
+
"subpath": "./temporal",
|
|
29263
|
+
"specifier": "@venizia/ignis-helpers/temporal",
|
|
29264
|
+
"kind": "class",
|
|
29265
|
+
"file": "packages/helpers/src/modules/temporal/adapters/intl.ts",
|
|
29266
|
+
"line": 15,
|
|
29267
|
+
"signature": "class IntlTemporalAdapter implements ITemporalAdapter"
|
|
29268
|
+
},
|
|
29089
29269
|
{
|
|
29090
29270
|
"name": "LuxonTemporalAdapter",
|
|
29091
29271
|
"package": "@venizia/ignis-helpers",
|
|
@@ -29106,6 +29286,16 @@
|
|
|
29106
29286
|
"line": 12,
|
|
29107
29287
|
"signature": "class NativeTemporalAdapter implements ITemporalAdapter"
|
|
29108
29288
|
},
|
|
29289
|
+
{
|
|
29290
|
+
"name": "TTemporalDurationStyle",
|
|
29291
|
+
"package": "@venizia/ignis-helpers",
|
|
29292
|
+
"subpath": "./temporal",
|
|
29293
|
+
"specifier": "@venizia/ignis-helpers/temporal",
|
|
29294
|
+
"kind": "type",
|
|
29295
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
29296
|
+
"line": 55,
|
|
29297
|
+
"signature": "type TTemporalDurationStyle = TConstValue<typeof TemporalDurationStyles>"
|
|
29298
|
+
},
|
|
29109
29299
|
{
|
|
29110
29300
|
"name": "TTemporalInput",
|
|
29111
29301
|
"package": "@venizia/ignis-helpers",
|
|
@@ -29126,6 +29316,16 @@
|
|
|
29126
29316
|
"line": 30,
|
|
29127
29317
|
"signature": "type TTemporalUnit = TConstValue<typeof TemporalUnits>"
|
|
29128
29318
|
},
|
|
29319
|
+
{
|
|
29320
|
+
"name": "TemporalDurationStyles",
|
|
29321
|
+
"package": "@venizia/ignis-helpers",
|
|
29322
|
+
"subpath": "./temporal",
|
|
29323
|
+
"specifier": "@venizia/ignis-helpers/temporal",
|
|
29324
|
+
"kind": "class",
|
|
29325
|
+
"file": "packages/helpers/src/modules/temporal/common/constants.ts",
|
|
29326
|
+
"line": 42,
|
|
29327
|
+
"signature": "class TemporalDurationStyles"
|
|
29328
|
+
},
|
|
29129
29329
|
{
|
|
29130
29330
|
"name": "TemporalHelper",
|
|
29131
29331
|
"package": "@venizia/ignis-helpers",
|
|
@@ -29133,7 +29333,7 @@
|
|
|
29133
29333
|
"specifier": "@venizia/ignis-helpers/temporal",
|
|
29134
29334
|
"kind": "class",
|
|
29135
29335
|
"file": "packages/helpers/src/modules/temporal/helper.ts",
|
|
29136
|
-
"line":
|
|
29336
|
+
"line": 81,
|
|
29137
29337
|
"signature": "class TemporalHelper extends BaseHelper"
|
|
29138
29338
|
},
|
|
29139
29339
|
{
|
|
@@ -28,7 +28,8 @@ An **adapter** answers one question: which UTC offset a zone observes at an inst
|
|
|
28
28
|
|
|
29
29
|
| Adapter | Build it with | Needs | Reach for it when |
|
|
30
30
|
|---|---|---|---|
|
|
31
|
-
| `NativeTemporalAdapter` (the default) | `new NativeTemporalAdapter()` | The runtime's `Temporal` API - Bun
|
|
31
|
+
| `NativeTemporalAdapter` (the default when the runtime has `Temporal`) | `new NativeTemporalAdapter()` | The runtime's `Temporal` API - Bun has it, not every browser does | You run on Bun |
|
|
32
|
+
| `IntlTemporalAdapter` (the default otherwise) | `new IntlTemporalAdapter()` | Nothing: `Intl.DateTimeFormat` ships in every browser and runtime | You run in a browser, or want one behaviour everywhere |
|
|
32
33
|
| `NativeTemporalAdapter` | `new NativeTemporalAdapter({ temporal })` | A Temporal polyfill's namespace | Your runtime has no `Temporal` and you want the standard API |
|
|
33
34
|
| `DayjsTemporalAdapter` | `new DayjsTemporalAdapter({ dayjs })` | Your `dayjs`, with the `utc` and `timezone` plugins extended | Your app already ships dayjs |
|
|
34
35
|
| `LuxonTemporalAdapter` | `new LuxonTemporalAdapter({ DateTime })` | Your Luxon `DateTime` class | Your app already ships Luxon |
|
|
@@ -105,7 +106,43 @@ temporal.format({ value: paidAt, pattern: '[on] D/M/YYYY [at] H:mm' }); // 'on 1
|
|
|
105
106
|
|
|
106
107
|
Without a pattern you get ISO 8601 with the zone's offset. Wrap literal text in `[brackets]`.
|
|
107
108
|
|
|
108
|
-
Patterns use the dayjs spelling
|
|
109
|
+
Patterns use the dayjs spelling - see [Pattern tokens](#pattern-tokens). Any other letter throws when the pattern is read, so a date-fns pattern like `yyyy-MM-dd` fails loudly instead of printing garbage.
|
|
110
|
+
|
|
111
|
+
### Write month names, weekdays and 12-hour time
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
const vietnamese = new TemporalHelper({ timeZone: 'Asia/Ho_Chi_Minh', locale: 'vi-VN' });
|
|
115
|
+
|
|
116
|
+
vietnamese.format({ value: paidAt, pattern: 'dddd, D MMMM YYYY hh:mm A' }); // 'Thứ Bảy, 19 Tháng 9 2026 12:00 CH'
|
|
117
|
+
temporal.format({ value: paidAt, pattern: 'ddd, MMM D, h:mm a', locale: 'en-US' }); // 'Sat, Sep 19, 12:00 pm'
|
|
118
|
+
temporal.format({ value: paidAt, pattern: 'LL', locale: 'en-US' }); // 'September 19, 2026'
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The names are what `Intl` spells for the locale, so a browser can differ slightly from Bun. These tokens write only: `parse` stays numeric. For anything a token cannot say, pass `Intl.DateTimeFormat` options to `formatIntl`:
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
temporal.formatIntl({ value: paidAt, options: { weekday: 'long', hour: 'numeric' }, locale: 'en-US' }); // 'Saturday 12 PM'
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Say how long ago
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
temporal.relative({ value: paidAt, base: '2026-09-19T08:00:00Z' }); // '3 hours ago'
|
|
131
|
+
temporal.relative({ value: paidAt, unit: TemporalUnits.DAY, numeric: 'auto' }); // 'yesterday', 'today', 'tomorrow'
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Without a `unit`, `relative` says the largest whole unit that has passed. With one, it counts that unit's boundaries in the zone: 23:00 yesterday, seen at 01:00, is `yesterday`. `base` defaults to now.
|
|
135
|
+
|
|
136
|
+
### Compare and measure
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
temporal.compare({ value: a, other: b, unit: TemporalUnits.DAY }); // -1, 0 or 1 - is a before, on, or after b's day?
|
|
140
|
+
temporal.diff({ value: b, other: a, unit: TemporalUnits.MONTH }); // whole months from a to b
|
|
141
|
+
temporal.tryParse({ value: input }); // a Date, or null where parse would throw
|
|
142
|
+
temporal.formatDuration({ milliseconds: 5_400_000 }); // '1h30m'
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
`diff` is the inverse of `add`: `diff(add(x, n), x)` is `n`, except in a zone that skipped a whole day (Samoa on 2011-12-30). Hours and smaller count elapsed time; days and larger count the calendar, so the 23-hour day of a spring-forward jump is one day.
|
|
109
146
|
|
|
110
147
|
### Move a date by days, months or hours
|
|
111
148
|
|
|
@@ -213,7 +250,7 @@ Those five plugins and that zone are what IGNIS configured. Then point every imp
|
|
|
213
250
|
| `isWeekday(date)` | `temporal.isWeekday({ value })` |
|
|
214
251
|
| `getNextWeekday({ date })` | `temporal.nextWeekday({ value })` |
|
|
215
252
|
| `getPreviousWeekday({ date })` | `temporal.previousWeekday({ value })` |
|
|
216
|
-
| `getDateTz({ date, timezone })` | `temporal.format({ value, timeZone })` for
|
|
253
|
+
| `getDateTz({ date, timezone })` | `temporal.format({ value, timeZone })` for text, with `dddd` for the weekday name; `temporal.parts({ value, timeZone })` for fields |
|
|
217
254
|
| `getDateTz({ ..., timeOffset })` | `temporal.add({ value, amount: timeOffset, unit: TemporalUnits.HOUR })` |
|
|
218
255
|
| `sleep()`, `hrTime()` | Unchanged - both still ship from `@venizia/ignis-helpers` |
|
|
219
256
|
|
|
@@ -235,8 +272,9 @@ The same names ship from `@venizia/ignis-helpers` and from the browser-safe `@ve
|
|
|
235
272
|
|
|
236
273
|
| Option | Type | Default | Meaning |
|
|
237
274
|
|---|---|---|---|
|
|
238
|
-
| `adapter` | `ITemporalAdapter` | `
|
|
275
|
+
| `adapter` | `ITemporalAdapter` | `NativeTemporalAdapter` when the runtime has `Temporal`, `IntlTemporalAdapter` otherwise | Converts time zones |
|
|
239
276
|
| `timeZone` | `string` | `'UTC'` | The IANA zone every call uses unless it passes its own. Checked when the helper is built |
|
|
277
|
+
| `locale` | `string` | `'en-US'` | Spells name tokens, relative time and durations, unless a call passes its own. A malformed tag is a 400 |
|
|
240
278
|
| `scope` | `string` | `'TemporalHelper'` | Logger scope, from `BaseHelper` |
|
|
241
279
|
|
|
242
280
|
### Methods
|
|
@@ -246,11 +284,15 @@ Every method takes one options object. `value` is a `TTemporalInput`: a `Date`,
|
|
|
246
284
|
| Method | Returns | What it does |
|
|
247
285
|
|---|---|---|
|
|
248
286
|
| `getTimeZone()` | `string` | The helper's zone |
|
|
287
|
+
| `getLocale()` | `string` | The helper's locale |
|
|
249
288
|
| `now()` | `Date` | The current instant |
|
|
250
289
|
| `toDate({ value, timeZone })` | `Date` | The instant `value` names. An ISO string without an offset is wall clock in the zone |
|
|
251
290
|
| `parts({ value, timeZone })` | `IZonedTemporalParts` | The wall clock in the zone, with the ISO weekday and the offset |
|
|
252
291
|
| `parse({ value, pattern, timeZone })` | `Date` | Reads a string: an exact match with `pattern`, ISO 8601 without. An offset in the value wins over the zone |
|
|
253
|
-
| `
|
|
292
|
+
| `tryParse({ value, pattern, timeZone })` | `Date \| null` | `parse`, answering `null` where `parse` throws a 400. A broken pattern still throws |
|
|
293
|
+
| `isValid({ value, pattern, timeZone })` | `boolean` | Whether the value names an instant in years 1-9999; a string is read as `parse` reads it |
|
|
294
|
+
| `format({ value, pattern, timeZone, locale })` | `string` | Writes the value in the zone. `pattern` defaults to `YYYY-MM-DDTHH:mm:ss.SSSZ` |
|
|
295
|
+
| `formatIntl({ value, options, timeZone, locale })` | `string` | Writes the value with `Intl.DateTimeFormat` options, in the zone |
|
|
254
296
|
| `add({ value, amount, unit, timeZone })` | `Date` | Moves the value by whole units - see [Units](#units) |
|
|
255
297
|
| `subtract({ value, amount, unit, timeZone })` | `Date` | `add` with the sign flipped |
|
|
256
298
|
| `startOf({ value, unit, timeZone })` | `Date` | The first instant of the unit containing the value |
|
|
@@ -258,6 +300,11 @@ Every method takes one options object. `value` is a `TTemporalInput`: a `Date`,
|
|
|
258
300
|
| `isWeekday({ value, timeZone })` | `boolean` | Monday to Friday, on the zone's wall clock |
|
|
259
301
|
| `nextWeekday({ value, timeZone })` | `Date` | The next Monday-to-Friday day, same wall time |
|
|
260
302
|
| `previousWeekday({ value, timeZone })` | `Date` | The previous Monday-to-Friday day, same wall time |
|
|
303
|
+
| `diff({ value, other, unit, timeZone })` | `number` | Whole units from `other` to `value`, truncated toward zero. The largest `n` that `add` can move `other` by without passing `value` |
|
|
304
|
+
| `compare({ value, other, unit, timeZone })` | `-1 \| 0 \| 1` | Before, in or after the unit holding `other`. Without `unit`, to the millisecond |
|
|
305
|
+
| `relative({ value, base, unit, numeric, style, timeZone, locale })` | `string` | `value` relative to `base` (default now), through `Intl.RelativeTimeFormat`. `unit` has no millisecond |
|
|
306
|
+
| `durationParts({ milliseconds })` | `ITemporalDurationParts` | Days, hours, minutes, seconds and milliseconds; a day is 24 hours |
|
|
307
|
+
| `formatDuration({ milliseconds, style, locale })` | `string` | `compact` (default) writes `1d1h30m`; `narrow`, `short` and `long` use the locale's unit words. Zero units and milliseconds are left out |
|
|
261
308
|
|
|
262
309
|
### Units
|
|
263
310
|
|
|
@@ -287,10 +334,16 @@ Examples format `2026-09-19T05:04:03.021Z` in `Asia/Ho_Chi_Minh`.
|
|
|
287
334
|
| `SSS` | Millisecond, three digits | `021` |
|
|
288
335
|
| `Z` | Offset with a colon, and seconds when it has them. Parsing also takes `Z` | `+07:00` |
|
|
289
336
|
| `ZZ` | Offset without a colon, and seconds when it has them. Parsing also takes `Z` | `+0700` |
|
|
337
|
+
| `MMMM` / `MMM` | Month name, long / short, on the Gregorian calendar whatever the locale's own. Writing only | `September` / `Sep` |
|
|
338
|
+
| `dddd` / `ddd` | Weekday name, long / short. Writing only | `Saturday` / `Sat` |
|
|
339
|
+
| `hh` / `h` | Hour 1-12, padded / unpadded. Writing only | `12` / `12` |
|
|
340
|
+
| `A` / `a` | AM/PM marker, as written / lower case. Writing only | `PM` / `pm` |
|
|
341
|
+
| `L` / `LL` | The date in the locale's numeric order / its long form. Writing only | `09/19/2026` / `September 19, 2026` |
|
|
290
342
|
| `[text]` | Literal text | `[at]` writes `at` |
|
|
291
343
|
| `T` | A literal `T` - the one letter allowed without brackets | `T` |
|
|
292
344
|
|
|
293
|
-
- A run of one letter is one token. `
|
|
345
|
+
- A run of one letter is one token. `DDDD` or `ZZZ` throws a 500 that names it, rather than being read as smaller tokens.
|
|
346
|
+
- Name examples are `en-US`. The writing-only tokens take the call's `locale`, or the helper's. A parse pattern holding one throws a 500.
|
|
294
347
|
- Any other letter throws the same way. Spaces and punctuation are literals.
|
|
295
348
|
- An offset with seconds is historic local mean time: `Asia/Ho_Chi_Minh` in 1900 writes `+07:06:30`. Parsing refuses an offset hour above 23, or a minute or second above 59.
|
|
296
349
|
- Parsing fills a field the pattern leaves out with its start: year 1970, month 1, day 1, 00:00:00.000.
|
|
@@ -317,8 +370,10 @@ Examples format `2026-09-19T05:04:03.021Z` in `Asia/Ho_Chi_Minh`.
|
|
|
317
370
|
| A value outside years 1-9999, or an `add` that leaves them | 400 | `[TemporalHelper]` ... `outside the years 1-9999` |
|
|
318
371
|
| An adapter called directly with a zone it cannot read | 400 | `[NativeTemporalAdapter] no offset for` (and the same for the other two) |
|
|
319
372
|
| An unknown unit, or a fractional `amount` | 400 | `[TemporalHelper] unknown unit` / `[TemporalHelper] amount must be an integer` |
|
|
320
|
-
| An unknown token, or an unclosed `[`, in a pattern | 500 | `[TemporalPattern]` |
|
|
321
|
-
|
|
|
373
|
+
| An unknown token, or an unclosed `[`, in a pattern; a writing-only token in a parse pattern | 500 | `[TemporalPattern]` |
|
|
374
|
+
| A malformed `locale` | 400 | `[TemporalLocale] invalid locale` |
|
|
375
|
+
| A fractional `milliseconds`, or an unknown duration `style` | 400 | `[TemporalDuration]` |
|
|
376
|
+
| `new NativeTemporalAdapter()` finds no `Temporal` | 500 | `[NativeTemporalAdapter] Temporal is not available on this runtime` |
|
|
322
377
|
| dayjs without the `timezone` plugin | 500 | ``[DayjsTemporalAdapter] dayjs has no `tz` `` |
|
|
323
378
|
|
|
324
379
|
### Types
|
|
@@ -335,8 +390,10 @@ interface ITemporalAdapter {
|
|
|
335
390
|
| `TTemporalInput` | `Date \| number \| string` |
|
|
336
391
|
| `ITemporalParts` | `year`, `month` (1-12), `day` (1-31), `hour`, `minute`, `second`, `millisecond` |
|
|
337
392
|
| `IZonedTemporalParts` | `ITemporalParts` plus `dayOfWeek` (ISO: 1 is Monday, 7 is Sunday) and `offsetMinutes` (east of UTC: `420` for `+07:00`; a fraction when the offset has seconds) |
|
|
393
|
+
| `ITemporalDurationParts` | `isNegative`, and non-negative `days`, `hours`, `minutes`, `seconds`, `milliseconds` |
|
|
338
394
|
|
|
339
|
-
- `DEFAULT_TEMPORAL_TIME_ZONE` is `'UTC'`. `DEFAULT_TEMPORAL_PATTERN` is `'YYYY-MM-DDTHH:mm:ss.SSSZ'`.
|
|
395
|
+
- `DEFAULT_TEMPORAL_TIME_ZONE` is `'UTC'`. `DEFAULT_TEMPORAL_PATTERN` is `'YYYY-MM-DDTHH:mm:ss.SSSZ'`. `DEFAULT_TEMPORAL_LOCALE` is `'en-US'`.
|
|
396
|
+
- `TemporalDurationStyles` holds `COMPACT`, `NARROW`, `SHORT` and `LONG`.
|
|
340
397
|
- The adapters type their library argument structurally (`ITemporalNamespace`, `IDayjsFactory`, `ILuxonDateTimeFactory`), so no date library's types ship with this package.
|
|
341
398
|
|
|
342
399
|
## See also
|
|
@@ -351,6 +408,9 @@ interface ITemporalAdapter {
|
|
|
351
408
|
- [`packages/helpers/src/modules/temporal/helper.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/helper.ts) - `TemporalHelper`
|
|
352
409
|
- [`packages/helpers/src/modules/temporal/pattern.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/pattern.ts) - the pattern dialect
|
|
353
410
|
- [`packages/helpers/src/modules/temporal/calendar.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/calendar.ts) - day and month arithmetic
|
|
411
|
+
- [`packages/helpers/src/modules/temporal/adapters/intl.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/adapters/intl.ts) - `IntlTemporalAdapter`
|
|
412
|
+
- [`packages/helpers/src/modules/temporal/locale.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/locale.ts) - month and weekday names per locale
|
|
413
|
+
- [`packages/helpers/src/modules/temporal/duration.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/duration.ts) - `durationParts` and `formatDuration`
|
|
354
414
|
- [`packages/helpers/src/modules/temporal/adapters/native.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/adapters/native.ts) - `NativeTemporalAdapter`
|
|
355
415
|
- [`packages/helpers/src/modules/temporal/adapters/dayjs.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/adapters/dayjs.ts) - `DayjsTemporalAdapter`
|
|
356
416
|
- [`packages/helpers/src/modules/temporal/adapters/luxon.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/modules/temporal/adapters/luxon.ts) - `LuxonTemporalAdapter`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/ignis-atlas",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2-0",
|
|
4
4
|
"description": "MCP server for IGNIS: search and read the wiki, changelogs and knowledge bundle by section, with citations. Bun-only, zero-dependency transport.",
|
|
5
5
|
"homepage": "https://ignis.venizia.ai",
|
|
6
6
|
"repository": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@hono/zod-openapi": "^1.6.3",
|
|
63
|
-
"@venizia/ignis-helpers": "^0.2.
|
|
63
|
+
"@venizia/ignis-helpers": "^0.2.2-0",
|
|
64
64
|
"zod": "^4.5.4"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|