@c9up/chronos 0.1.14 → 0.1.16

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 (52) hide show
  1. package/README.md +63 -16
  2. package/dist/DateTime.d.ts +145 -4
  3. package/dist/DateTime.d.ts.map +1 -1
  4. package/dist/DateTime.js +504 -87
  5. package/dist/DateTime.js.map +1 -1
  6. package/dist/Duration.d.ts +37 -20
  7. package/dist/Duration.d.ts.map +1 -1
  8. package/dist/Duration.js +287 -120
  9. package/dist/Duration.js.map +1 -1
  10. package/dist/Interval.d.ts +50 -7
  11. package/dist/Interval.d.ts.map +1 -1
  12. package/dist/Interval.js +142 -29
  13. package/dist/Interval.js.map +1 -1
  14. package/dist/atlas.d.ts +11 -15
  15. package/dist/atlas.d.ts.map +1 -1
  16. package/dist/atlas.js +22 -17
  17. package/dist/atlas.js.map +1 -1
  18. package/dist/format.d.ts +37 -0
  19. package/dist/format.d.ts.map +1 -0
  20. package/dist/format.js +387 -0
  21. package/dist/format.js.map +1 -0
  22. package/dist/index.d.ts +5 -5
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +3 -3
  25. package/dist/index.js.map +1 -1
  26. package/dist/native/generated.d.ts +2 -2
  27. package/dist/native/generated.d.ts.map +1 -1
  28. package/dist/native.js +2 -2
  29. package/dist/native.js.map +1 -1
  30. package/dist/rrule.d.ts +25 -1
  31. package/dist/rrule.d.ts.map +1 -1
  32. package/dist/rrule.js +130 -32
  33. package/dist/rrule.js.map +1 -1
  34. package/index.darwin-arm64.node +0 -0
  35. package/index.darwin-x64.node +0 -0
  36. package/index.linux-arm64-gnu.node +0 -0
  37. package/index.linux-x64-gnu.node +0 -0
  38. package/index.win32-x64-msvc.node +0 -0
  39. package/package.json +3 -2
  40. package/src/DateTime.ts +645 -96
  41. package/src/Duration.ts +318 -139
  42. package/src/Interval.ts +160 -53
  43. package/src/atlas.ts +23 -17
  44. package/src/format.ts +449 -0
  45. package/src/index.ts +17 -7
  46. package/src/native/generated.ts +6 -2
  47. package/src/native.ts +3 -3
  48. package/src/rrule.ts +189 -37
  49. package/wasm/chronos_engine_wasm.d.ts +4 -4
  50. package/wasm/chronos_engine_wasm.js +26 -16
  51. package/wasm/chronos_engine_wasm_bg.wasm +0 -0
  52. package/wasm/chronos_engine_wasm_bg.wasm.d.ts +2 -2
package/README.md CHANGED
@@ -23,23 +23,38 @@ import { DateTime, at } from '@c9up/chronos'
23
23
  const d = DateTime.from('2026-06-05T14:30:00Z')
24
24
 
25
25
  d.plus(1, 'month').toISO() // 2026-07-05T14:30:00.000Z
26
- d.setZone('Europe/Zurich')
27
- .toZonedISO() // 2026-06-05T16:30:00+02:00
28
- d.format('DD/MM/YYYY HH:mm') // 05/06/2026 14:30
26
+ d.plus({ months: 1, days: 2 }) // a Duration works too
27
+ d.setZone('Europe/Zurich').toISO() // 2026-06-05T16:30:00.000+02:00 (same instant)
28
+ d.toFormat('dd/MM/yyyy HH:mm') // 05/06/2026 14:30 (yyyy/dd/LLL tokens)
29
+ d.format('DD/MM/YYYY HH:mm') // 05/06/2026 14:30 (YYYY/DD tokens)
30
+ d.toSQL() // 2026-06-05 14:30:00.000 Z
31
+ d.set({ hour: 9 }).toISO() // 2026-06-05T09:00:00.000Z
29
32
  d.startOf('month').toISO() // 2026-06-01T00:00:00.000Z
30
- d.diff('2026-01-01', 'day') // 155.604 (a minus b, fractional)
33
+ d.diff('2026-01-01', 'day').as('day') // 155.604 (a minus b, a Duration)
34
+ d.diff('2026-01-01', ['months', 'days']) // { months: 5, days: 4.604… }
35
+ d > DateTime.from('2026-01-01') // true — valueOf is the epoch ms
31
36
  ```
32
37
 
33
38
  `at()` is the same thing, shorter: `at('2026-06-05')`.
34
39
 
35
40
  Built from whatever you have:
36
- `from` · `now` · `fromMillis` · `fromSeconds` · `fromUnix` · `fromJSDate` ·
37
- `fromObject` · `fromRFC2822` · `fromSQL` · `fromHTTP`.
38
-
39
- Read out as `toISO` · `toZonedISO` · `toDate` · `toMillis` · `toSeconds` ·
41
+ `from` · `now` · `local` · `utc` · `fromISO` · `fromMillis` · `fromSeconds` ·
42
+ `fromUnix` · `fromJSDate` · `fromObject` · `fromRFC2822` · `fromSQL` ·
43
+ `fromHTTP`. `fromISO`, `fromObject` and `fromSQL` take `{ zone }`: a time
44
+ without an offset is then a wall clock in that zone (UTC otherwise — never the
45
+ host's zone).
46
+
47
+ Read out as `toISO` · `toISODate` · `toISOTime` · `toSQL` · `toSQLDate` ·
48
+ `toSQLTime` · `toZonedISO` · `toDate` · `toMillis` · `toSeconds` · `toFormat` ·
40
49
  `format` · `toLocaleString` · `toRelative`, compared with `equals` · `isBefore` ·
41
- `isAfter` · `isSameDay` · `hasSame` · `isWithin`, and moved with `plus` ·
42
- `minus` · `startOf` · `endOf` · `setZone` · `toUTC`.
50
+ `isAfter` · `isSameDay` · `hasSame` · `isWithin` (or `<`, `>`), and moved with
51
+ `plus` · `minus` · `set` · `startOf` · `endOf` · `setZone` (`keepLocalTime`) ·
52
+ `setLocale` · `toUTC`.
53
+
54
+ Strings are read as ISO 8601 only (`YYYY-MM-DD`, with an optional time — `T`
55
+ or a space — and offset); anything else is refused, as are values outside
56
+ years 0000-9999. `plus`/`minus` refuse a non-finite amount and carry a fraction
57
+ as elapsed time: `plus(1.5, 'day')` is one calendar day and twelve hours.
43
58
 
44
59
  ### A date that does not exist is refused
45
60
 
@@ -48,6 +63,14 @@ DateTime.from('2026-02-30')
48
63
  // Invalid date '2026-02-30': February 2026 has 28 days, so there is no day 30.
49
64
  ```
50
65
 
66
+ So is a zone the tz database does not know — at every entry that takes one,
67
+ `DateTime.now(zone)`, `new DateTime(input, zone)` and `setZone(zone)` alike:
68
+
69
+ ```ts
70
+ DateTime.now('Mars/Olympus')
71
+ // Unknown IANA timezone: 'Mars/Olympus'. Check https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
72
+ ```
73
+
51
74
  `new Date('2026-02-30')` answers March 2nd. Those overflow semantics are right
52
75
  for arithmetic and wrong for reading input, where the same slide turns a typo
53
76
  into a fact. Only the *written* date is checked, so an offset that legitimately
@@ -86,8 +109,11 @@ Duration.fromObject({ minutes: 90 }).normalize().toObject()
86
109
  // { years: 0, months: 0, weeks: 0, days: 0, hours: 1, minutes: 30, ... }
87
110
  ```
88
111
 
89
- `plus` · `minus` · `negate` · `normalize` · `shiftTo` · `as` · `get`, out as
90
- `toISO` · `toFormat` · `toHuman` · `toObject`.
112
+ `plus` · `minus` · `negate` · `normalize` · `rescale` · `shiftTo` ·
113
+ `shiftToAll` · `mapUnits` · `as` · `get`, out as `toISO` · `toMillis` ·
114
+ `toFormat` · `toHuman` · `toObject`. Every value must be a finite number (a
115
+ numeric string is coerced) and every unit known — `{ hours: NaN }` and
116
+ `{ fortnights: 1 }` are refused. A year converts as 365 days, a month as 30.
91
117
 
92
118
  ## Interval
93
119
 
@@ -106,8 +132,14 @@ june.contains(DateTime.from('2026-06-15')) // true
106
132
  june.splitBy({ amount: 1, unit: 'week' }) // 5 intervals
107
133
  ```
108
134
 
109
- Set operations: `overlaps` · `engulfs` · `intersection` · `union` ·
110
- `abutsStart` · `abutsEnd` · `splitBy` · `splitAt`.
135
+ `Interval.after(start, duration)` and `splitBy` step on the calendar in the
136
+ start's zone (January 31st plus a month ends on February 28th);
137
+ `Interval.before` and `Interval.fromISO('start/end' | 'start/P1M' | 'P1D/end')`
138
+ build the other ways.
139
+
140
+ Set operations: `overlaps` · `engulfs` · `intersection` · `union` (the span
141
+ covering both, gap included) · `Interval.merge` · `Interval.xor` ·
142
+ `difference` · `count` · `abutsStart` · `abutsEnd` · `splitBy` · `splitAt`.
111
143
 
112
144
  Units are accepted singular or plural, and an unknown one is refused rather
113
145
  than quietly measured in milliseconds.
@@ -127,7 +159,22 @@ toRRuleString({ freq: 'MONTHLY', byMonthDay: [1, 15] })
127
159
 
128
160
  A rule takes `freq` · `interval` · `wkst` · `byDay` · `byMonthDay` · `byMonth` ·
129
161
  `byWeekNo` · `byYearDay` · `bySetPos` · `byHour` · `byMinute` · `bySecond`, and
130
- ends on `count` or `until`.
162
+ ends on `count` or `until`. What the rule leaves out comes from the start, as
163
+ RFC 5545 says: `FREQ=MONTHLY` repeats on the start's day of the month.
164
+
165
+ ```ts
166
+ // On a zone's wall clock: a 09:00 meeting stays at 09:00 across DST.
167
+ expandRRule('2026-03-23T08:00:00Z', 'FREQ=WEEKLY;COUNT=2', { tzid: 'Europe/Paris' })
168
+ // 2026-03-23T08:00:00.000Z, 2026-03-30T07:00:00.000Z
169
+
170
+ // The iCalendar form, DTSTART read from the text.
171
+ expandRRule('DTSTART;TZID=Europe/Paris:20260323T090000\nRRULE:FREQ=WEEKLY;COUNT=2')
172
+ ```
173
+
174
+ A rule from user input or an imported .ics is safe to expand: the text is
175
+ capped at 8 KB, BY* lists are sets, at most 10 000 occurrences come back, and
176
+ iteration ends at year 9999, so an unsatisfiable rule answers `[]` in
177
+ milliseconds. Unknown properties and malformed parts are refused.
131
178
 
132
179
  ## Ranges
133
180
 
@@ -150,7 +197,7 @@ import { Column } from '@c9up/atlas'
150
197
  import { dateTimeAtlasAdapter } from '@c9up/chronos/atlas'
151
198
 
152
199
  class Order {
153
- @Column({ adapter: dateTimeAtlasAdapter }) declare placedAt: DateTime
200
+ @Column(dateTimeAtlasAdapter) declare placedAt: DateTime
154
201
  }
155
202
  ```
156
203
 
@@ -1,3 +1,16 @@
1
+ /**
2
+ * DateTime — immutable UTC datetime value object for the Ream framework.
3
+ *
4
+ * **All operations route through the Rust `chronos-engine` via NAPI.** There
5
+ * is no TS fallback — timezone math, DST transitions, and RFC 5545 recurrence
6
+ * are too complex to maintain a correct TS mirror. If the NAPI binary is
7
+ * missing, every method throws immediately with a clear "build the engine"
8
+ * message. This is the same contract as Atlas (SQL compilation requires the
9
+ * Rust atlas-query binary).
10
+ *
11
+ * @implements Epic 36 — Chronos
12
+ */
13
+ import { Duration, type DurationObject, type DurationUnit } from "./Duration.js";
1
14
  export type DateUnit = "second" | "minute" | "hour" | "day" | "week" | "month" | "year";
2
15
  export type BoundUnit = "second" | "minute" | "hour" | "day" | "week" | "month" | "year";
3
16
  export type DateInput = string | Date | DateTime;
@@ -37,13 +50,33 @@ export interface CalendarParts {
37
50
  }
38
51
  export declare class DateTime {
39
52
  #private;
53
+ /**
54
+ * @throws on a zone the tz database does not know. An unknown zone used to
55
+ * be stored as given and break later, on the first offset or format.
56
+ */
40
57
  constructor(input?: string | Date, zone?: string);
41
58
  static from(input: DateInput): DateTime;
59
+ /** Now, or the given wall clock, in the host's zone (Luxon's `DateTime.local`). */
60
+ static local(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): DateTime;
61
+ /** Now, or the given wall clock, in UTC (Luxon's `DateTime.utc`). */
62
+ static utc(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): DateTime;
42
63
  static now(zone?: string): DateTime;
43
64
  static fromMillis(ms: number): DateTime;
44
65
  static fromSeconds(seconds: number): DateTime;
45
66
  static fromUnix(seconds: number): DateTime;
46
67
  static fromJSDate(date: Date): DateTime;
68
+ /**
69
+ * Read an ISO 8601 string. An offset-less one is a wall clock in
70
+ * `options.zone` (UTC by default), and the result is in that zone.
71
+ */
72
+ static fromISO(text: string, options?: {
73
+ zone?: string;
74
+ }): DateTime;
75
+ /**
76
+ * Build from calendar fields, read as a wall clock in `options.zone` (UTC by
77
+ * default). Every field is checked: an integer within its range (minute
78
+ * 0-59, …), and a year read literally (50 is year 0050, not 1950).
79
+ */
47
80
  static fromObject(obj: {
48
81
  year: number;
49
82
  month: number;
@@ -51,22 +84,92 @@ export declare class DateTime {
51
84
  hour?: number;
52
85
  minute?: number;
53
86
  second?: number;
87
+ millisecond?: number;
88
+ /** @deprecated spelled `millisecond`, as Luxon does. */
54
89
  ms?: number;
90
+ }, options?: {
91
+ zone?: string;
55
92
  }): DateTime;
56
93
  static fromRFC2822(input: string): DateTime;
57
- static fromSQL(input: string): DateTime;
94
+ /**
95
+ * Read a SQL literal: `YYYY-MM-DD`, or `YYYY-MM-DD HH:mm[:ss[.fff]]` with an
96
+ * optional offset (`+00`, `+02:00` — PostgreSQL's `timestamptz` text) or
97
+ * IANA zone. Without one, the value is a wall clock in `options.zone` (UTC
98
+ * by default), and the result is in that zone.
99
+ */
100
+ static fromSQL(input: string, options?: {
101
+ zone?: string;
102
+ }): DateTime;
58
103
  static fromHTTP(input: string): DateTime;
59
104
  get zoneName(): string;
60
105
  get offset(): number;
61
- setZone(zone: string): DateTime;
106
+ /**
107
+ * The same instant in another zone, or — with `keepLocalTime` — the same
108
+ * wall clock in another zone (a different instant), as Luxon's `setZone`.
109
+ */
110
+ setZone(zone: string, options?: {
111
+ keepLocalTime?: boolean;
112
+ }): DateTime;
62
113
  toUTC(): DateTime;
114
+ get locale(): string;
115
+ /** A copy whose names (`toFormat`) and `toLocaleString` default use `locale`. */
116
+ setLocale(locale: string): DateTime;
117
+ /** Always true: chronos refuses invalid input instead of building an invalid value. */
118
+ get isValid(): boolean;
119
+ /**
120
+ * A copy with some calendar fields replaced, read on this value's wall
121
+ * clock (Luxon's `set`). Changing the month keeps the day within it unless
122
+ * the day is given too.
123
+ *
124
+ * @throws RangeError on a field out of range.
125
+ */
126
+ set(values: {
127
+ year?: number;
128
+ month?: number;
129
+ day?: number;
130
+ hour?: number;
131
+ minute?: number;
132
+ second?: number;
133
+ millisecond?: number;
134
+ }): DateTime;
63
135
  toZonedISO(): string;
136
+ /**
137
+ * Move by `amount` units. The whole part moves on the calendar (in the
138
+ * value's zone for day/week/month/year); a fraction is carried as elapsed
139
+ * time at Luxon's casual lengths (day 24 h, month 30 days, year 365 days),
140
+ * so `plus(1.5, "day")` is one calendar day and twelve hours.
141
+ *
142
+ * @throws RangeError on a non-finite amount (NaN, ±Infinity, a non-number),
143
+ * which the native boundary would otherwise read as 0, and on a result
144
+ * outside years 0000-9999.
145
+ */
64
146
  plus(amount: number, unit: DateUnit): DateTime;
147
+ /**
148
+ * Move by a duration, as Luxon's `plus(duration)`: whole years and months
149
+ * first (one step, so Feb 29 + 1 year 1 month is Mar 29), then whole weeks
150
+ * and days, both on the zone's calendar, then fractions and clock units as
151
+ * elapsed time.
152
+ */
153
+ plus(duration: Duration | DurationObject): DateTime;
65
154
  minus(amount: number, unit: DateUnit): DateTime;
66
- diff(other: DateInput, unit: DateUnit): number;
155
+ /** Move back by a duration — `plus` of its negation, as in Luxon. */
156
+ minus(duration: Duration | DurationObject): DateTime;
157
+ /**
158
+ * `this - other` as a Duration in the given unit(s), as Luxon's `diff`:
159
+ * calendar units are counted on this value's calendar (a day across a DST
160
+ * change is one day), the lowest unit keeps its fraction, and clock units
161
+ * take what is left. `.as(unit)` reads it as a number.
162
+ */
163
+ diff(other: DateInput, unit?: DateUnit | DurationUnit | "millisecond" | ReadonlyArray<DateUnit | DurationUnit | "millisecond">): Duration;
164
+ /**
165
+ * Same instant — and, against another DateTime, same zone and locale, as
166
+ * Luxon's `equals`. Compare `toMillis()` (or use `<`, `>`) for the instant
167
+ * alone.
168
+ */
67
169
  equals(other: DateInput): boolean;
68
170
  isBefore(other: DateInput): boolean;
69
171
  isAfter(other: DateInput): boolean;
172
+ /** Whether `other` falls in the same `unit` as this value, on this value's calendar. */
70
173
  hasSame(other: DateInput, unit: BoundUnit): boolean;
71
174
  isSameDay(other: DateInput): boolean;
72
175
  /**
@@ -81,12 +184,50 @@ export declare class DateTime {
81
184
  /** The last instant of `unit` — see {@link startOf} on the shared routine. */
82
185
  endOf(unit: BoundUnit): DateTime;
83
186
  isWithin(range: DateRange, options?: RangeCompareOptions): boolean;
187
+ /**
188
+ * Format with chronos's moment-style tokens (`YYYY`, `YY`, `MM`, `DD`,
189
+ * `HH`, `mm`, `ss`, `Z`; `[text]` is literal) on this value's wall clock.
190
+ * Luxon's tokens (`yyyy`, `dd`, `LLL`, …) are {@link toFormat}.
191
+ */
84
192
  format(pattern?: string): string;
193
+ /**
194
+ * Format with Luxon's tokens (`yyyy-MM-dd HH:mm`, `dd LLL yyyy`, `EEEE`,
195
+ * `ZZ`, macros such as `DD` or `t`; `'quoted'` text is literal), on this
196
+ * value's wall clock. {@link format} keeps chronos's moment-style tokens.
197
+ */
198
+ toFormat(pattern: string): string;
85
199
  toDate(): Date;
86
- toISO(): string;
200
+ /**
201
+ * ISO 8601 on this value's wall clock, as Luxon's `toISO`: `…Z` in UTC,
202
+ * the local offset (`2026-08-10T12:00:00.000+02:00`) in any other zone —
203
+ * the same instant either way.
204
+ */
205
+ toISO(options?: {
206
+ suppressMilliseconds?: boolean;
207
+ includeOffset?: boolean;
208
+ }): string;
209
+ /** `yyyy-MM-dd` on this value's calendar. */
210
+ toISODate(): string;
211
+ /** `HH:mm:ss.SSS` plus the offset, on this value's wall clock. */
212
+ toISOTime(options?: {
213
+ suppressMilliseconds?: boolean;
214
+ includeOffset?: boolean;
215
+ }): string;
216
+ /** `yyyy-MM-dd`, as SQL writes a date. */
217
+ toSQLDate(): string;
218
+ /** `HH:mm:ss.SSS +02:00` (`Z` in UTC), as Luxon's `toSQLTime`. */
219
+ toSQLTime(options?: {
220
+ includeOffset?: boolean;
221
+ }): string;
222
+ /** `yyyy-MM-dd HH:mm:ss.SSS +02:00`, as Luxon's `toSQL`. */
223
+ toSQL(options?: {
224
+ includeOffset?: boolean;
225
+ }): string;
87
226
  toString(): string;
88
227
  toJSON(): string;
89
228
  toMillis(): number;
229
+ /** Epoch milliseconds, so `a < b` and `a - b` work as with Luxon. */
230
+ valueOf(): number;
90
231
  toSeconds(): number;
91
232
  toLocaleString(locale?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
92
233
  toRelative(options?: {
@@ -1 +1 @@
1
- {"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../src/DateTime.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,QAAQ,GACjB,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,KAAK,GACL,MAAM,GACN,OAAO,GACP,MAAM,CAAC;AACV,MAAM,MAAM,SAAS,GAClB,QAAQ,G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