Deno adds API for date and time operations
Briefly

Deno adds API for date and time operations
"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."
"Deno 1.40 also embraces the latest ECMAScript decorator syntax for more expressive code. With the decorator syntax, Deno now supports the ECMA Stage 3 decorators proposal for browsers. Decorators are a proposal for extending JavaScript classes and are widely adopted among developers in transpiler environments. Other features in Deno 1.40 include the following: Deno now supports the properties import.meta.filename, which provides a path for the current module file, and import.meta.dirname, which provides a path to the directory containing the current module file."
Deno 1.40 introduces the Temporal API behind the --unstable-temporal flag to provide a modern, scoped date/time API replacing many Date pitfalls. Temporal exposes a top-level namespace with separate classes for date-only, time-only, and other contexts to improve readability and avoid bugs from assuming epoch zero, UTC, or local time zone for unknown values. The release adds ECMA Stage 3 decorator syntax support for more expressive class extensions. It also exposes import.meta.filename and import.meta.dirname, ships additional built-in Node.js APIs, simplifies imports field subpath syntax, improves diagnostics and deno doc printing, and embeds TypeScript's Language Service API for performance and bug fixes.
Read at InfoWorld
Unable to calculate read time
[
|
]