aboutsummaryrefslogtreecommitdiff
path: root/src/temporal-ambient.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/temporal-ambient.d.ts')
-rw-r--r--src/temporal-ambient.d.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/temporal-ambient.d.ts b/src/temporal-ambient.d.ts
index c5ec34f..38e69d4 100644
--- a/src/temporal-ambient.d.ts
+++ b/src/temporal-ambient.d.ts
@@ -10,6 +10,7 @@ declare global {
};
interface Duration {
+ readonly days: number;
total(options: { unit: 'millisecond' | 'day' }): number;
}
namespace Duration {
@@ -47,6 +48,8 @@ declare global {
readonly dayOfWeek: number;
add(durationLike: DurationLike): PlainDate;
subtract(durationLike: DurationLike): PlainDate;
+ /** Difference to another date; largest unit defaults to days. */
+ until(other: PlainDate): Duration;
toZonedDateTime(timeZone: TimeZoneId): ZonedDateTime;
toString(): string;
}