Skip to content

Commit 1dca5a7

Browse files
bartlomiejuclaude
andauthored
docs: update Temporal API to reflect stable status in Deno 2.7 (#2947)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8994ce7 commit 1dca5a7

File tree

3 files changed

+16
-28
lines changed

3 files changed

+16
-28
lines changed

examples/_data.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ export const sidebar = [
166166
"https://www.youtube.com/watch?v=oxVwTT-rZRo&list=PLvvLnBDNuTEov9EBIp3MMfHlBxaKGRWTe&index=6",
167167
type: "video",
168168
},
169+
{
170+
title: "Temporal API",
171+
href: "/examples/temporal/",
172+
type: "example",
173+
},
169174
{
170175
title: "Better debugging with the console API",
171176
href: "/examples/debugging_with_console_tutorial/",
@@ -1077,11 +1082,6 @@ export const sidebar = [
10771082
href: "/examples/udp_connector/",
10781083
type: "example",
10791084
},
1080-
{
1081-
title: "Temporal API",
1082-
href: "/examples/temporal/",
1083-
type: "example",
1084-
},
10851085
{
10861086
title: "Importing text",
10871087
href: "/examples/importing_text/",

examples/scripts/temporal.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* @title Temporal API
33
* @difficulty beginner
44
* @tags cli
5-
* @run --unstable-temporal <url>
5+
* @run <url>
66
* @resource {https://docs.deno.com/api/web/~/Temporal} Temporal API reference documentation
77
* @resource {https://tc39.es/proposal-temporal/docs} Temporal API proposal documentation
8-
* @group Unstable APIs
8+
* @group Web APIs
99
*/
1010

1111
// Get the current date

runtime/reference/cli/unstable_flags.md

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -236,28 +236,20 @@ Please use these feature flags instead moving forward.
236236

237237
## `--unstable-temporal`
238238

239-
Enable the experimental [Temporal API](https://tc39.es/proposal-temporal/docs/)
240-
in the global scope. The Temporal API is a modern date and time API that is
241-
being developed as a replacement for the legacy `Date` object in JavaScript. It
242-
provides better support for time zones, calendars, and more precise date/time
243-
calculations.
239+
:::note
244240

245-
To use the Temporal API in your Deno program, run it with the flag:
241+
As of Deno 2.7, the Temporal API is **stable** and available by default. The
242+
`--unstable-temporal` flag is no longer required.
246243

247-
```sh
248-
deno run --unstable-temporal your_script.ts
249-
```
244+
:::
250245

251-
Or configure it in your `deno.json`:
252-
253-
```json title="deno.json"
254-
{
255-
"unstable": ["temporal"]
256-
}
257-
```
246+
The [Temporal API](https://tc39.es/proposal-temporal/docs/) is a modern date and
247+
time API available in the global scope. It provides better support for time
248+
zones, calendars, and more precise date/time calculations than the legacy `Date`
249+
object.
258250

259251
```ts title="example.ts"
260-
// Example using Temporal API
252+
// Get the current date and time
261253
const now = Temporal.Now.plainDateTimeISO();
262254
console.log(`Current date and time: ${now}`);
263255

@@ -269,7 +261,3 @@ console.log(`Next week: ${nextWeek}`);
269261
const zonedDateTime = Temporal.Now.zonedDateTimeISO("America/New_York");
270262
console.log(`Time in New York: ${zonedDateTime}`);
271263
```
272-
273-
Note that the Temporal API is still experimental and the specification may
274-
change before it becomes stable. Use this flag only for testing and
275-
experimentation.

0 commit comments

Comments
 (0)