@c9up/chronos 0.1.15 → 0.1.17

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 (74) hide show
  1. package/README.md +136 -16
  2. package/dist/DateTime.d.ts +209 -8
  3. package/dist/DateTime.d.ts.map +1 -1
  4. package/dist/DateTime.js +815 -116
  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 +47 -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/holidays.d.ts +43 -0
  23. package/dist/holidays.d.ts.map +1 -0
  24. package/dist/holidays.js +102 -0
  25. package/dist/holidays.js.map +1 -0
  26. package/dist/index.d.ts +8 -6
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +4 -3
  29. package/dist/index.js.map +1 -1
  30. package/dist/native/generated.d.ts +11 -2
  31. package/dist/native/generated.d.ts.map +1 -1
  32. package/dist/native.d.ts.map +1 -1
  33. package/dist/native.js +5 -2
  34. package/dist/native.js.map +1 -1
  35. package/dist/parse.d.ts +59 -0
  36. package/dist/parse.d.ts.map +1 -0
  37. package/dist/parse.js +404 -0
  38. package/dist/parse.js.map +1 -0
  39. package/dist/rrule.d.ts +34 -2
  40. package/dist/rrule.d.ts.map +1 -1
  41. package/dist/rrule.js +156 -32
  42. package/dist/rrule.js.map +1 -1
  43. package/index.darwin-arm64.node +0 -0
  44. package/index.darwin-x64.node +0 -0
  45. package/index.linux-arm64-gnu.node +0 -0
  46. package/index.linux-x64-gnu.node +0 -0
  47. package/index.win32-x64-msvc.node +0 -0
  48. package/package.json +2 -3
  49. package/src/DateTime.ts +1089 -124
  50. package/src/Duration.ts +318 -139
  51. package/src/Interval.ts +160 -53
  52. package/src/atlas.ts +23 -17
  53. package/src/format.ts +449 -0
  54. package/src/holidays.ts +161 -0
  55. package/src/index.ts +35 -7
  56. package/src/native/generated.ts +27 -2
  57. package/src/native.ts +7 -3
  58. package/src/parse.ts +559 -0
  59. package/src/rrule.ts +229 -38
  60. package/wasm/chronos_engine_wasm.d.ts +13 -4
  61. package/wasm/chronos_engine_wasm.js +87 -16
  62. package/wasm/chronos_engine_wasm_bg.wasm +0 -0
  63. package/wasm/chronos_engine_wasm_bg.wasm.d.ts +5 -2
  64. package/dist/utils.d.ts +0 -15
  65. package/dist/utils.d.ts.map +0 -1
  66. package/dist/utils.js +0 -17
  67. package/dist/utils.js.map +0 -1
  68. package/scripts/build-napi-types.mjs +0 -69
  69. package/scripts/clean-wasm-pack-meta.mjs +0 -32
  70. package/scripts/copy-napi.mjs +0 -56
  71. package/scripts/generate-napi-types.mjs +0 -156
  72. package/scripts/verify-napi.mjs +0 -46
  73. package/scripts/verify-wasm.mjs +0 -55
  74. package/src/utils.ts +0 -17
package/README.md CHANGED
@@ -23,23 +23,52 @@ 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`.
41
+ `from` · `now` · `local` · `utc` · `fromISO` · `fromMillis` · `fromSeconds` ·
42
+ `fromUnix` · `fromJSDate` · `fromObject` · `fromRFC2822` · `fromSQL` ·
43
+ `fromHTTP` · `fromFormat`. `fromISO`, `fromObject`, `fromSQL` and
44
+ `fromFormat` take `{ zone }`: a time without an offset is then a wall clock in
45
+ that zone (UTC otherwise — never the host's zone).
38
46
 
39
- Read out as `toISO` · `toZonedISO` · `toDate` · `toMillis` · `toSeconds` ·
40
- `format` · `toLocaleString` · `toRelative`, compared with `equals` · `isBefore` ·
41
- `isAfter` · `isSameDay` · `hasSame` · `isWithin`, and moved with `plus` ·
42
- `minus` · `startOf` · `endOf` · `setZone` · `toUTC`.
47
+ `fromFormat` reads the tokens `toFormat` writes, names in `{ locale }` (en-US
48
+ by default); units the format leaves out come from now for the larger ones and
49
+ start at their minimum for the smaller ones:
50
+
51
+ ```ts
52
+ DateTime.fromFormat('10/08/2026 09:30', 'dd/MM/yyyy HH:mm', { zone: 'Europe/Paris' })
53
+ DateTime.fromFormat('10 août 2026', 'd MMMM yyyy', { locale: 'fr' })
54
+ DateTime.fromFormat('14:30', 'HH:mm') // today at 14:30 UTC
55
+ ```
56
+
57
+ Text that does not match the format, or names a date that does not exist,
58
+ throws.
59
+
60
+ Read out as `toISO` · `toISODate` · `toISOTime` · `toSQL` · `toSQLDate` ·
61
+ `toSQLTime` · `toZonedISO` · `toDate` · `toMillis` · `toSeconds` · `toFormat` ·
62
+ `format` · `toLocaleString` · `toRelative` ("1 day ago") · `toRelativeCalendar`
63
+ ("yesterday"), compared with `equals` · `isBefore` ·
64
+ `isAfter` · `isSameDay` · `hasSame` · `isWithin` (or `<`, `>`), and moved with
65
+ `plus` · `minus` · `set` · `startOf` · `endOf` · `setZone` (`keepLocalTime`) ·
66
+ `setLocale` · `toUTC`.
67
+
68
+ Strings are read as ISO 8601 only (`YYYY-MM-DD`, with an optional time — `T`
69
+ or a space — and offset); anything else is refused, as are values outside
70
+ years 0000-9999. `plus`/`minus` refuse a non-finite amount and carry a fraction
71
+ as elapsed time: `plus(1.5, 'day')` is one calendar day and twelve hours.
43
72
 
44
73
  ### A date that does not exist is refused
45
74
 
@@ -48,6 +77,14 @@ DateTime.from('2026-02-30')
48
77
  // Invalid date '2026-02-30': February 2026 has 28 days, so there is no day 30.
49
78
  ```
50
79
 
80
+ So is a zone the tz database does not know — at every entry that takes one,
81
+ `DateTime.now(zone)`, `new DateTime(input, zone)` and `setZone(zone)` alike:
82
+
83
+ ```ts
84
+ DateTime.now('Mars/Olympus')
85
+ // Unknown IANA timezone: 'Mars/Olympus'. Check https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
86
+ ```
87
+
51
88
  `new Date('2026-02-30')` answers March 2nd. Those overflow semantics are right
52
89
  for arithmetic and wrong for reading input, where the same slide turns a typo
53
90
  into a fact. Only the *written* date is checked, so an offset that legitimately
@@ -86,8 +123,11 @@ Duration.fromObject({ minutes: 90 }).normalize().toObject()
86
123
  // { years: 0, months: 0, weeks: 0, days: 0, hours: 1, minutes: 30, ... }
87
124
  ```
88
125
 
89
- `plus` · `minus` · `negate` · `normalize` · `shiftTo` · `as` · `get`, out as
90
- `toISO` · `toFormat` · `toHuman` · `toObject`.
126
+ `plus` · `minus` · `negate` · `normalize` · `rescale` · `shiftTo` ·
127
+ `shiftToAll` · `mapUnits` · `as` · `get`, out as `toISO` · `toMillis` ·
128
+ `toFormat` · `toHuman` · `toObject`. Every value must be a finite number (a
129
+ numeric string is coerced) and every unit known — `{ hours: NaN }` and
130
+ `{ fortnights: 1 }` are refused. A year converts as 365 days, a month as 30.
91
131
 
92
132
  ## Interval
93
133
 
@@ -106,8 +146,14 @@ june.contains(DateTime.from('2026-06-15')) // true
106
146
  june.splitBy({ amount: 1, unit: 'week' }) // 5 intervals
107
147
  ```
108
148
 
109
- Set operations: `overlaps` · `engulfs` · `intersection` · `union` ·
110
- `abutsStart` · `abutsEnd` · `splitBy` · `splitAt`.
149
+ `Interval.after(start, duration)` and `splitBy` step on the calendar in the
150
+ start's zone (January 31st plus a month ends on February 28th);
151
+ `Interval.before` and `Interval.fromISO('start/end' | 'start/P1M' | 'P1D/end')`
152
+ build the other ways.
153
+
154
+ Set operations: `overlaps` · `engulfs` · `intersection` · `union` (the span
155
+ covering both, gap included) · `Interval.merge` · `Interval.xor` ·
156
+ `difference` · `count` · `abutsStart` · `abutsEnd` · `splitBy` · `splitAt`.
111
157
 
112
158
  Units are accepted singular or plural, and an unknown one is refused rather
113
159
  than quietly measured in milliseconds.
@@ -127,7 +173,81 @@ toRRuleString({ freq: 'MONTHLY', byMonthDay: [1, 15] })
127
173
 
128
174
  A rule takes `freq` · `interval` · `wkst` · `byDay` · `byMonthDay` · `byMonth` ·
129
175
  `byWeekNo` · `byYearDay` · `bySetPos` · `byHour` · `byMinute` · `bySecond`, and
130
- ends on `count` or `until`.
176
+ ends on `count` or `until`. What the rule leaves out comes from the start, as
177
+ RFC 5545 says: `FREQ=MONTHLY` repeats on the start's day of the month.
178
+
179
+ ```ts
180
+ // On a zone's wall clock: a 09:00 meeting stays at 09:00 across DST.
181
+ expandRRule('2026-03-23T08:00:00Z', 'FREQ=WEEKLY;COUNT=2', { tzid: 'Europe/Paris' })
182
+ // 2026-03-23T08:00:00.000Z, 2026-03-30T07:00:00.000Z
183
+
184
+ // The iCalendar form, DTSTART read from the text.
185
+ expandRRule('DTSTART;TZID=Europe/Paris:20260323T090000\nRRULE:FREQ=WEEKLY;COUNT=2')
186
+ ```
187
+
188
+ ### Exceptions: EXDATE and RDATE
189
+
190
+ A series without some of its occurrences, or with a few more, as RFC 5545
191
+ §3.8.5 sets it: the rule's occurrences and the RDATEs, without the EXDATEs.
192
+ COUNT and UNTIL bound the rule alone — an EXDATE does not give its place back.
193
+
194
+ ```ts
195
+ // A Monday slot, not on the 28th, once on Wednesday the 30th instead.
196
+ expandRRule(
197
+ 'DTSTART;TZID=Europe/Zurich:20261214T090000\n' +
198
+ 'RRULE:FREQ=WEEKLY;BYDAY=MO;COUNT=4\n' +
199
+ 'EXDATE;TZID=Europe/Zurich:20261228T090000\n' +
200
+ 'RDATE;TZID=Europe/Zurich:20261230T140000',
201
+ )
202
+
203
+ // The same, as options: instants or DateTimes.
204
+ expandRRule(start, { freq: 'WEEKLY', count: 3 }, { exdates: ['2026-12-21T09:00:00+01:00'], rdates: [extra] })
205
+ ```
206
+
207
+ A floating value is read on its line's TZID, else on the rule's zone; a `Z`
208
+ value is the instant it names. Date-times only: `VALUE=DATE` would name days
209
+ of a series of times, which RFC 5545 forbids, and an RDATE `PERIOD` is not an
210
+ occurrence — both are refused rather than guessed at.
211
+
212
+ A rule from user input or an imported .ics is safe to expand: the rule is
213
+ capped at 8 KB and the whole text, exceptions included, at 256 KB; EXDATE and
214
+ RDATE name at most 10 000 date-times; BY* lists are sets, at most 10 000
215
+ occurrences come back, and iteration ends at year 9999, so an unsatisfiable
216
+ rule answers `[]` in milliseconds. Unknown properties and malformed parts are
217
+ refused.
218
+
219
+ ## Public holidays and Easter
220
+
221
+ ```ts
222
+ import { easterDate, holidays, isHoliday } from '@c9up/chronos'
223
+
224
+ easterDate(2026) // '2026-04-05'
225
+ holidays(2026, { country: 'FR' }) // [{ date: '2026-01-01', key: 'new_year' }, …]
226
+ holidays(2026, { country: 'CH', region: 'VD' }) // federal days + Vaud's
227
+ isHoliday('2026-09-21', { country: 'CH', region: 'VD' }) // true: Federal Fast Monday
228
+ isHoliday(DateTime.now().setZone('Europe/Zurich'), { country: 'CH', region: 'GE' })
229
+ ```
230
+
231
+ Computed by the engine, in Node and in the browser alike. `country` is `FR`
232
+ (its eleven national days) or `CH`: without a `region` its three federal days
233
+ (1 January, 1 August, 25 December), with one a canton's two-letter code
234
+ (`SWISS_CANTONS`) adding that canton's days: Easter Monday, Ascension and Whit
235
+ Monday everywhere, then its own, fixed (Saint Berchtold, Saint Stephen,
236
+ Assumption, All Saints, …) or moving (Good Friday, Corpus Christi, Federal Fast
237
+ Monday in Vaud and Neuchâtel, the Geneva Fast, the Näfelser Fahrt in Glarus).
238
+
239
+ - Each holiday has a stable `key` (`easter_monday`, `federal_fast_monday`, …)
240
+ for the application to translate; chronos names none in any language.
241
+ - Two holidays on one day are both listed (Ascension on 1 May, 2008).
242
+ - Neuchâtel's 2 January and 26 December count only when 1 January / 25
243
+ December is a Sunday. The Näfelser Fahrt is the first Thursday of April, one
244
+ week later when that Thursday falls in Holy Week.
245
+ - A `DateTime` is read on its own wall clock; a string must be `YYYY-MM-DD`.
246
+ - An unknown country or canton is refused (`E_CHRONOS_UNKNOWN_COUNTRY`,
247
+ `E_CHRONOS_UNKNOWN_REGION`) rather than answered with no holiday; the Easter
248
+ date is computed for 1583-9999 (`E_CHRONOS_INVALID_YEAR`).
249
+ - The cantonal table is today's calendar applied to every year: it does not
250
+ know when a holiday was instituted.
131
251
 
132
252
  ## Ranges
133
253
 
@@ -150,7 +270,7 @@ import { Column } from '@c9up/atlas'
150
270
  import { dateTimeAtlasAdapter } from '@c9up/chronos/atlas'
151
271
 
152
272
  class Order {
153
- @Column({ adapter: dateTimeAtlasAdapter }) declare placedAt: DateTime
273
+ @Column(dateTimeAtlasAdapter) declare placedAt: DateTime
154
274
  }
155
275
  ```
156
276
 
@@ -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;
@@ -35,15 +48,61 @@ export interface CalendarParts {
35
48
  daysInYear: number;
36
49
  isLeapYear: boolean;
37
50
  }
51
+ /** A unit `toRelative` and `toRelativeCalendar` can count in. */
52
+ export type RelativeUnit = "years" | "months" | "weeks" | "days" | "hours" | "minutes" | "seconds";
53
+ export type RelativeUnitLike = RelativeUnit | "year" | "month" | "week" | "day" | "hour" | "minute" | "second";
54
+ export type RelativeRounding = "trunc" | "expand" | "round" | "floor" | "ceil";
55
+ interface RelativeFormatOptions {
56
+ /** Compared against; now, in this value's zone, by default. */
57
+ base?: DateInput;
58
+ /** Overrides this value's locale. */
59
+ locale?: Intl.LocalesArgument;
60
+ style?: Intl.RelativeTimeFormatStyle;
61
+ /** Reaches the formatter; the engine may not honour it. */
62
+ numberingSystem?: string;
63
+ }
64
+ export interface ToRelativeOptions extends RelativeFormatOptions {
65
+ /** One unit, or the units to pick the largest non-zero one from. */
66
+ unit?: RelativeUnitLike | readonly RelativeUnitLike[];
67
+ /** Round the count (default), or keep two decimals. */
68
+ round?: boolean;
69
+ /** How the count is rounded; toward zero by default. */
70
+ rounding?: RelativeRounding;
71
+ /** Milliseconds added away from the base before counting. */
72
+ padding?: number;
73
+ }
74
+ export interface ToRelativeCalendarOptions extends RelativeFormatOptions {
75
+ unit?: RelativeUnitLike;
76
+ }
38
77
  export declare class DateTime {
39
78
  #private;
79
+ /**
80
+ * @throws on a zone the tz database does not know. An unknown zone used to
81
+ * be stored as given and break later, on the first offset or format.
82
+ */
40
83
  constructor(input?: string | Date, zone?: string);
41
84
  static from(input: DateInput): DateTime;
85
+ /** Now, or the given wall clock, in the host's zone (Luxon's `DateTime.local`). */
86
+ static local(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): DateTime;
87
+ /** Now, or the given wall clock, in UTC (Luxon's `DateTime.utc`). */
88
+ static utc(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): DateTime;
42
89
  static now(zone?: string): DateTime;
43
90
  static fromMillis(ms: number): DateTime;
44
91
  static fromSeconds(seconds: number): DateTime;
45
92
  static fromUnix(seconds: number): DateTime;
46
93
  static fromJSDate(date: Date): DateTime;
94
+ /**
95
+ * Read an ISO 8601 string. An offset-less one is a wall clock in
96
+ * `options.zone` (UTC by default), and the result is in that zone.
97
+ */
98
+ static fromISO(text: string, options?: {
99
+ zone?: string;
100
+ }): DateTime;
101
+ /**
102
+ * Build from calendar fields, read as a wall clock in `options.zone` (UTC by
103
+ * default). Every field is checked: an integer within its range (minute
104
+ * 0-59, …), and a year read literally (50 is year 0050, not 1950).
105
+ */
47
106
  static fromObject(obj: {
48
107
  year: number;
49
108
  month: number;
@@ -51,22 +110,113 @@ export declare class DateTime {
51
110
  hour?: number;
52
111
  minute?: number;
53
112
  second?: number;
113
+ millisecond?: number;
114
+ /** @deprecated spelled `millisecond`, as Luxon does. */
54
115
  ms?: number;
116
+ }, options?: {
117
+ zone?: string;
55
118
  }): DateTime;
56
119
  static fromRFC2822(input: string): DateTime;
57
- static fromSQL(input: string): DateTime;
120
+ /**
121
+ * Read a SQL literal: `YYYY-MM-DD`, or `YYYY-MM-DD HH:mm[:ss[.fff]]` with an
122
+ * optional offset (`+00`, `+02:00` — PostgreSQL's `timestamptz` text) or
123
+ * IANA zone. Without one, the value is a wall clock in `options.zone` (UTC
124
+ * by default), and the result is in that zone.
125
+ */
126
+ static fromSQL(input: string, options?: {
127
+ zone?: string;
128
+ }): DateTime;
58
129
  static fromHTTP(input: string): DateTime;
130
+ /**
131
+ * Read `text` written with Luxon's format tokens (`dd/MM/yyyy HH:mm`,
132
+ * `dd LLL yyyy 'at' h:mm a`, `kkkk-'W'WW-c`, macros such as `D` or `f`), as
133
+ * Luxon's `fromFormat`. Units the format leaves out are filled as Luxon
134
+ * fills them: larger ones from now, smaller ones with their minimum
135
+ * (`HH:mm` is today at that time, `MMMM` the 1st of that month this year).
136
+ *
137
+ * The wall clock is read in the zone the text names (`z`), else at the
138
+ * offset it writes (`Z`, `ZZ`, `ZZZ`), else in `options.zone` (UTC by
139
+ * default); the result is in `options.zone`. Names are matched in
140
+ * `options.locale` (en-US by default), which the result keeps.
141
+ *
142
+ * Two deviations, named: text that does not match the format, or names a
143
+ * date that does not exist, throws instead of returning an invalid value
144
+ * (chronos has no invalid DateTime); and there is no `setZone` option, since
145
+ * a chronos zone is an IANA name and an offset alone names none.
146
+ */
147
+ static fromFormat(text: string, format: string, options?: {
148
+ zone?: string;
149
+ locale?: string;
150
+ }): DateTime;
59
151
  get zoneName(): string;
60
152
  get offset(): number;
61
- setZone(zone: string): DateTime;
153
+ /**
154
+ * The same instant in another zone, or — with `keepLocalTime` — the same
155
+ * wall clock in another zone (a different instant), as Luxon's `setZone`.
156
+ */
157
+ setZone(zone: string, options?: {
158
+ keepLocalTime?: boolean;
159
+ }): DateTime;
62
160
  toUTC(): DateTime;
161
+ get locale(): string;
162
+ /** A copy whose names (`toFormat`) and `toLocaleString` default use `locale`. */
163
+ setLocale(locale: string): DateTime;
164
+ /** Always true: chronos refuses invalid input instead of building an invalid value. */
165
+ get isValid(): boolean;
166
+ /**
167
+ * A copy with some calendar fields replaced, read on this value's wall
168
+ * clock (Luxon's `set`). Changing the month keeps the day within it unless
169
+ * the day is given too.
170
+ *
171
+ * @throws RangeError on a field out of range.
172
+ */
173
+ set(values: {
174
+ year?: number;
175
+ month?: number;
176
+ day?: number;
177
+ hour?: number;
178
+ minute?: number;
179
+ second?: number;
180
+ millisecond?: number;
181
+ }): DateTime;
63
182
  toZonedISO(): string;
183
+ /**
184
+ * Move by `amount` units. The whole part moves on the calendar (in the
185
+ * value's zone for day/week/month/year); a fraction is carried as elapsed
186
+ * time at Luxon's casual lengths (day 24 h, month 30 days, year 365 days),
187
+ * so `plus(1.5, "day")` is one calendar day and twelve hours.
188
+ *
189
+ * @throws RangeError on a non-finite amount (NaN, ±Infinity, a non-number),
190
+ * which the native boundary would otherwise read as 0, and on a result
191
+ * outside years 0000-9999.
192
+ */
64
193
  plus(amount: number, unit: DateUnit): DateTime;
194
+ /**
195
+ * Move by a duration, as Luxon's `plus(duration)`: whole years and months
196
+ * first (one step, so Feb 29 + 1 year 1 month is Mar 29), then whole weeks
197
+ * and days, both on the zone's calendar, then fractions and clock units as
198
+ * elapsed time.
199
+ */
200
+ plus(duration: Duration | DurationObject): DateTime;
65
201
  minus(amount: number, unit: DateUnit): DateTime;
66
- diff(other: DateInput, unit: DateUnit): number;
202
+ /** Move back by a duration — `plus` of its negation, as in Luxon. */
203
+ minus(duration: Duration | DurationObject): DateTime;
204
+ /**
205
+ * `this - other` as a Duration in the given unit(s), as Luxon's `diff`:
206
+ * calendar units are counted on this value's calendar (a day across a DST
207
+ * change is one day), the lowest unit keeps its fraction, and clock units
208
+ * take what is left. `.as(unit)` reads it as a number.
209
+ */
210
+ diff(other: DateInput, unit?: DateUnit | DurationUnit | "millisecond" | ReadonlyArray<DateUnit | DurationUnit | "millisecond">): Duration;
211
+ /**
212
+ * Same instant — and, against another DateTime, same zone and locale, as
213
+ * Luxon's `equals`. Compare `toMillis()` (or use `<`, `>`) for the instant
214
+ * alone.
215
+ */
67
216
  equals(other: DateInput): boolean;
68
217
  isBefore(other: DateInput): boolean;
69
218
  isAfter(other: DateInput): boolean;
219
+ /** Whether `other` falls in the same `unit` as this value, on this value's calendar. */
70
220
  hasSame(other: DateInput, unit: BoundUnit): boolean;
71
221
  isSameDay(other: DateInput): boolean;
72
222
  /**
@@ -81,18 +231,68 @@ export declare class DateTime {
81
231
  /** The last instant of `unit` — see {@link startOf} on the shared routine. */
82
232
  endOf(unit: BoundUnit): DateTime;
83
233
  isWithin(range: DateRange, options?: RangeCompareOptions): boolean;
234
+ /**
235
+ * Format with chronos's moment-style tokens (`YYYY`, `YY`, `MM`, `DD`,
236
+ * `HH`, `mm`, `ss`, `Z`; `[text]` is literal) on this value's wall clock.
237
+ * Luxon's tokens (`yyyy`, `dd`, `LLL`, …) are {@link toFormat}.
238
+ */
84
239
  format(pattern?: string): string;
240
+ /**
241
+ * Format with Luxon's tokens (`yyyy-MM-dd HH:mm`, `dd LLL yyyy`, `EEEE`,
242
+ * `ZZ`, macros such as `DD` or `t`; `'quoted'` text is literal), on this
243
+ * value's wall clock. {@link format} keeps chronos's moment-style tokens.
244
+ */
245
+ toFormat(pattern: string): string;
85
246
  toDate(): Date;
86
- toISO(): string;
247
+ /**
248
+ * ISO 8601 on this value's wall clock, as Luxon's `toISO`: `…Z` in UTC,
249
+ * the local offset (`2026-08-10T12:00:00.000+02:00`) in any other zone —
250
+ * the same instant either way.
251
+ */
252
+ toISO(options?: {
253
+ suppressMilliseconds?: boolean;
254
+ includeOffset?: boolean;
255
+ }): string;
256
+ /** `yyyy-MM-dd` on this value's calendar. */
257
+ toISODate(): string;
258
+ /** `HH:mm:ss.SSS` plus the offset, on this value's wall clock. */
259
+ toISOTime(options?: {
260
+ suppressMilliseconds?: boolean;
261
+ includeOffset?: boolean;
262
+ }): string;
263
+ /** `yyyy-MM-dd`, as SQL writes a date. */
264
+ toSQLDate(): string;
265
+ /** `HH:mm:ss.SSS +02:00` (`Z` in UTC), as Luxon's `toSQLTime`. */
266
+ toSQLTime(options?: {
267
+ includeOffset?: boolean;
268
+ }): string;
269
+ /** `yyyy-MM-dd HH:mm:ss.SSS +02:00`, as Luxon's `toSQL`. */
270
+ toSQL(options?: {
271
+ includeOffset?: boolean;
272
+ }): string;
87
273
  toString(): string;
88
274
  toJSON(): string;
89
275
  toMillis(): number;
276
+ /** Epoch milliseconds, so `a < b` and `a - b` work as with Luxon. */
277
+ valueOf(): number;
90
278
  toSeconds(): number;
91
279
  toLocaleString(locale?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
92
- toRelative(options?: {
93
- base?: DateInput;
94
- locale?: Intl.LocalesArgument;
95
- }): string;
280
+ /**
281
+ * This value relative to `base` (now by default), as Luxon's `toRelative`:
282
+ * "in 1 day", "48 hours ago". The count is the calendar-aware diff in the
283
+ * largest unit that reaches 1, truncated toward zero, always as a number
284
+ * ("1 day ago", never "yesterday": that is {@link toRelativeCalendar}).
285
+ * Formatted in this value's locale unless `locale` is given.
286
+ *
287
+ * NAMED DEVIATION: no `quarters` unit, as chronos's Duration has none.
288
+ */
289
+ toRelative(options?: ToRelativeOptions): string;
290
+ /**
291
+ * This value relative to `base`'s calendar, as Luxon's
292
+ * `toRelativeCalendar`: "yesterday", "next month", "3 days ago". Counts the
293
+ * calendar boundaries crossed in years, months, then days, or in `unit`.
294
+ */
295
+ toRelativeCalendar(options?: ToRelativeCalendarOptions): string;
96
296
  get calendar(): CalendarParts;
97
297
  get weekday(): number;
98
298
  get weekNumber(): number;
@@ -114,4 +314,5 @@ export declare function inRange(input: DateInput, range: DateRange, options?: Ra
114
314
  export declare function containsRange(outer: DateRange, inner: DateRange, options?: RangeCompareOptions): boolean;
115
315
  export declare function overlapsRange(a: DateRange, b: DateRange, options?: RangeCompareOptions): boolean;
116
316
  export declare function analyzeRange(a: DateRange, b: DateRange, options?: RangeCompareOptions): RangeRelation;
317
+ export {};
117
318
  //# sourceMappingURL=DateTime.d.ts.map
@@ -1 +1 @@
1
- {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