Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING INTRO TO HTML & CSS BASH RUST

Basic JavaScript

JS Tutorial JS Syntax JS Variables JS Operators JS If Conditions JS Loops JS Strings JS Numbers JS Functions JS Objects JS Scope JS Dates JS Temporal Dates JS Arrays JS Sets JS Maps JS Iterations JS Math JS RegExp JS Destructuring JS Data Types JS Errors JS Debugging JS Conventions JS References JS 2026 JS Versions

JS HTML

JS HTML DOM JS Events JS Projects New

JS Advanced

JS Functions JS Objects JS Classes JS Asynchronous JS Modules JS Meta & Proxy JS Typed Arrays JS DOM Navigation JS Windows JS Web APIs JS AJAX JS JSON JS jQuery JS Graphics JS Examples JS Reference


JavaScript Temporal Now

Temporal is the modern way to work with dates and times in JavaScript.

Learn how to get the current date and time using JavaScript Temporal.Now.

See examples of Instant, PlainDate, and ZonedDateTime.

The Temporal.Now object provides methods for getting the current date and time.

Unlike Date, Temporal lets you choose exactly what type of value you want.


Get the Current Instant

An Instant represents an exact moment in time (UTC).

It is similar to a timestamp.

Example

let now = Temporal.Now.instant();
Try it Yourself »

This returns the current moment in UTC.


Get the Current Date (ISO)

If you only need today's date (year, month, day), use plainDateISO().

Example

let today = Temporal.Now.plainDateISO();
Try it Yourself »

This returns a PlainDate object using the ISO calendar.


Get the Current Date and Time (No Time Zone)

Use plainDateTimeISO() to get the current date and time without a time zone.

Example

let dateTime = Temporal.Now.plainDateTimeISO();
Try it Yourself »

This is useful when you need local date and time but not time zone calculations.


Get the Current Date and Time with Time Zone

Use zonedDateTimeISO() when you need time zone information.

Example

let zoned = Temporal.Now.zonedDateTimeISO();
Try it Yourself »

This returns a ZonedDateTime that includes your system's time zone.


Compare With Date

With Date, you only get one type of object.

Date Example

let d = new Date();
Try it Yourself »

Temporal gives you separate types depending on what you need.

  • Instant - Exact moment in UTC.

  • PlainDate - Date only.

  • PlainDateTime - Date and time without zone.

  • ZonedDateTime - Date and time with zone.


When to Use Each Method

  • Use instant() for timestamps and comparisons.

  • Use plainDateISO() for birthdays and calendar dates.

  • Use plainDateTimeISO() for local scheduling.

  • Use zonedDateTimeISO() for international or time zone-aware applications.


Summary

Temporal.Now provides clear and flexible ways to get the current date and time.

You can choose the exact type you need instead of using one general-purpose object.


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.

-->