Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference for stage 3 temporal #37344

Merged
merged 46 commits into from
Jan 20, 2025
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
27a3784
Reference for stage 3 temporal
Josh-Cena Dec 21, 2024
a477fa3
More description
Josh-Cena Dec 24, 2024
9f50952
Duration docs
Josh-Cena Dec 26, 2024
bd0796c
Fix link
Josh-Cena Dec 26, 2024
fbd0601
Complete Duration docs
Josh-Cena Dec 26, 2024
6ab2afd
Instant docs
Josh-Cena Dec 27, 2024
ef79211
Now docs
Josh-Cena Dec 27, 2024
02295b7
TZ and calendar docs
Josh-Cena Dec 27, 2024
0936403
PlainDate docs
Josh-Cena Dec 29, 2024
889b358
Change ISO format description
Josh-Cena Dec 29, 2024
7ca2b31
ZonedDateTime-specific stuff docs
Josh-Cena Dec 29, 2024
7d9cdfe
PlainMonthDay docs, copy date-related fields to PlainDateTime
Josh-Cena Dec 30, 2024
a0ab015
PlainYearMonth docs
Josh-Cena Dec 30, 2024
f4342cf
PlainTime docs
Josh-Cena Dec 31, 2024
4974d24
Intl docs
Josh-Cena Dec 31, 2024
0a172b6
PlainDateTime docs
Josh-Cena Jan 2, 2025
ac18c5f
ZonedDateTime docs, easy part
Josh-Cena Jan 2, 2025
ac298ef
ZonedDateTime docs... and that shall be all
Josh-Cena Jan 3, 2025
f385d12
Simplifications and fixes
Josh-Cena Jan 3, 2025
49485c0
typo
Josh-Cena Jan 3, 2025
2995aaa
Merge branch 'main' into temporal
Josh-Cena Jan 3, 2025
1324f8d
Apply suggestions from code review
Josh-Cena Jan 5, 2025
44f3f7b
ISO 8601 -> RFC 9557
Josh-Cena Jan 5, 2025
a27aa82
Clarify time zone ID input
Josh-Cena Jan 6, 2025
1ad6603
Time zone ID is required
Josh-Cena Jan 6, 2025
f30c94e
Slight reorg
Josh-Cena Jan 7, 2025
7a86d33
Apply suggestions from code review
Josh-Cena Jan 9, 2025
fc843e3
More feedback
Josh-Cena Jan 9, 2025
cb3ce38
More reviews
Josh-Cena Jan 9, 2025
26c065c
Merge branch 'main' into temporal
fiji-flo Jan 10, 2025
0b7b04d
Reviews
Josh-Cena Jan 10, 2025
ce86a53
Reviews, Temporal.Now
Josh-Cena Jan 10, 2025
e28fc82
Mention precision of Temporal.Now methods
Josh-Cena Jan 10, 2025
6756d76
Reviews, landing pages
Josh-Cena Jan 10, 2025
fc28f6b
Apply suggestions from code review
Josh-Cena Jan 10, 2025
2e7b76a
Time zone / calendar / time components
Josh-Cena Jan 13, 2025
2ebbb0e
Reviews, other constructors
Josh-Cena Jan 14, 2025
0f7231a
Reviews, other constructors, arithmetic, monthCode
Josh-Cena Jan 14, 2025
627cdeb
Merge branch 'main' into temporal
Josh-Cena Jan 14, 2025
bf72961
Update index.md
Josh-Cena Jan 14, 2025
0ca21c0
Update index.md
Josh-Cena Jan 14, 2025
25e1bb1
Update index.md
Josh-Cena Jan 14, 2025
aa9c790
Merge branch 'main' into temporal
Josh-Cena Jan 16, 2025
4b68919
Reviews, some (?) conversion methods
Josh-Cena Jan 16, 2025
1a21ed6
Last group of reviews
Josh-Cena Jan 16, 2025
3fd90b9
Mention toTemporalInstant RangeError
Josh-Cena Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Reference for stage 3 temporal
Josh-Cena committed Dec 23, 2024
commit 27a37849bc988e62fa6d8f0498e04d12414865e0
Original file line number Diff line number Diff line change
@@ -284,6 +284,8 @@ These properties are defined on `Date.prototype` and shared by all `Date` instan
- : Returns a string with a locality-sensitive representation of the time portion of this date, based on system settings.
- {{jsxref("Date.prototype.toString()")}}
- : Returns a string representing the specified `Date` object. Overrides the {{jsxref("Object.prototype.toString()")}} method.
- {{jsxref("Date.prototype.toTemporalInstant()")}}
- : TODO
- {{jsxref("Date.prototype.toTimeString()")}}
- : Returns the "time" portion of the `Date` as a human-readable string.
- {{jsxref("Date.prototype.toUTCString()")}}
Josh-Cena marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Date.prototype.toTemporalInstant()
slug: Web/JavaScript/Reference/Global_Objects/Date/toTemporalInstant
page-type: javascript-instance-method
browser-compat: javascript.builtins.Date.toTemporalInstant
---

{{JSRef}}

The **`toTemporalInstant()`** method of {{jsxref("Date")}} instances TODO

## Syntax

```js-nolint
toTemporalInstant()
```

### Parameters

None.

### Return value

TODO

## Description

TODO

## Examples

TODO

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- TODO
Original file line number Diff line number Diff line change
@@ -74,6 +74,7 @@ These are the base objects representing numbers, dates, and mathematical calcula
- {{jsxref("BigInt")}}
- {{jsxref("Math")}}
- {{jsxref("Date")}}
- {{jsxref("Temporal")}}
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved

### Text processing

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Temporal.Duration.prototype.abs()
slug: Web/JavaScript/Reference/Global_Objects/Temporal/Duration/abs
page-type: javascript-instance-method
browser-compat: javascript.builtins.Temporal.Duration.abs
---

{{JSRef}}

The **`abs()`** method of {{jsxref("Temporal.Duration")}} instances TODO

## Syntax

```js-nolint
abs()
```

### Parameters

None.

### Return value

TODO

### Exceptions

TODO

## Description

TODO

## Examples

TODO

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Temporal.Duration.prototype.add()
slug: Web/JavaScript/Reference/Global_Objects/Temporal/Duration/add
page-type: javascript-instance-method
browser-compat: javascript.builtins.Temporal.Duration.add
---

{{JSRef}}

The **`add()`** method of {{jsxref("Temporal.Duration")}} instances TODO

## Syntax

```js-nolint
add(other)
```

### Parameters

- `other`
- : TODO

### Return value

TODO

### Exceptions

TODO

## Description

TODO

## Examples

TODO

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Temporal.Duration.prototype.blank
slug: Web/JavaScript/Reference/Global_Objects/Temporal/Duration/blank
page-type: javascript-instance-accessor-property
browser-compat: javascript.builtins.Temporal.Duration.blank
---

{{JSRef}}

The **`blank`** accessor property of {{jsxref("Temporal.Duration")}} instances TODO

## Description

TODO

## Examples

TODO

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: Temporal.Duration.compare()
slug: Web/JavaScript/Reference/Global_Objects/Temporal/Duration/compare
page-type: javascript-static-method
browser-compat: javascript.builtins.Temporal.Duration.compare
---

{{JSRef}}

The **`Temporal.Duration.compare()`** static method TODO

## Syntax

```js-nolint
Temporal.Duration.compare(duration1, duration2)
Temporal.Duration.compare(duration1, duration2, options)
```

### Parameters

- `duration1`
- : TODO
- `duration2`
- : TODO
- `options` {{optional_inline}}
- : TODO

### Return value

TODO

### Exceptions

TODO

## Description

TODO

## Examples

TODO

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Temporal.Duration.prototype.days
slug: Web/JavaScript/Reference/Global_Objects/Temporal/Duration/days
page-type: javascript-instance-accessor-property
browser-compat: javascript.builtins.Temporal.Duration.days
---

{{JSRef}}

The **`days`** accessor property of {{jsxref("Temporal.Duration")}} instances TODO

## Description

TODO

## Examples

TODO

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: Temporal.Duration()
slug: Web/JavaScript/Reference/Global_Objects/Temporal/Duration/Duration
page-type: javascript-constructor
browser-compat: javascript.builtins.Temporal.Duration.Duration
---

{{JSRef}}

The **`Temporal.Duration()`** constructor creates {{jsxref("Temporal.Duration")}} objects.

## Syntax

```js-nolint
new Temporal.Duration()
new Temporal.Duration(years)
new Temporal.Duration(years, months)
new Temporal.Duration(years, months, weeks)
new Temporal.Duration(years, months, weeks, days)
new Temporal.Duration(years, months, weeks, days, hours)
new Temporal.Duration(years, months, weeks, days, hours, minutes)
new Temporal.Duration(years, months, weeks, days, hours, minutes, seconds)
new Temporal.Duration(years, months, weeks, days, hours, minutes, seconds, milliseconds)
new Temporal.Duration(years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds)
new Temporal.Duration(years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds)
```

### Parameters

- `years` {{optional_inline}}
- : TODO
- `months` {{optional_inline}}
- : TODO
- `weeks` {{optional_inline}}
- : TODO
- `days` {{optional_inline}}
- : TODO
- `hours` {{optional_inline}}
- : TODO
- `minutes` {{optional_inline}}
- : TODO
- `seconds` {{optional_inline}}
- : TODO
- `milliseconds` {{optional_inline}}
- : TODO
- `microseconds` {{optional_inline}}
- : TODO
- `nanoseconds` {{optional_inline}}
- : TODO

### Return value

TODO

### Exceptions

TODO

## Description

TODO

## Examples

TODO

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- TODO
Loading