Top
image credit: mamewmy / Freepik

Deno adds API for date and time operations

January 25, 2024

Via: InfoWorld

Deno 1.40, the latest version of the JavaScript runtime positioned as a rival to Node.js, has been launched with a Temporal API for advanced date and time operations.

The update was announced January 25. Deno can be accessed from deno.com.

The Temporal API is intended to address shortcomings of the existing Date object in JavaScript. It’s available with the –-unstable-temporal flag. Temporal acts as a top-level namespace that brings a modern date/time API to JavaScript. Temporal provides separate classes for date-only, time-only, and other scoped use cases, making code more readable and preventing bugs caused by incorrectly assuming 0, UTC, or the local time zone for values that are actually unknown.

Read More on InfoWorld