@@ -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
261253const now = Temporal .Now .plainDateTimeISO ();
262254console .log (` Current date and time: ${now } ` );
263255
@@ -269,7 +261,3 @@ console.log(`Next week: ${nextWeek}`);
269261const zonedDateTime = Temporal .Now .zonedDateTimeISO (" America/New_York" );
270262console .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