People phrase the same need many ways: javascript get current date, get current date javascript, js get current date, javascript current date, javascript get date, or js get date. For javascript datetime now, the usual entry point is new Date() with no arguments, which captures the current instant on the host clock. From that value you can read numeric fields (getFullYear, getMonth, getDate, and their getUTC* counterparts), millisecond timestamps with getTime(), ISO strings with toISOString(), or human-facing text with toLocaleDateString and Intl.DateTimeFormat.
The snippets below use one fixed instant—2026-06-10T12:30:45.000Z—so the sample output stays identical every time you run the examples. In your own code you would call new Date() without arguments when you need the live clock; the methods are the same, only the values change. For epoch milliseconds and Unix seconds, see JavaScript timestamp: get, generate, and convert epoch time. For comparisons and ordering, see JavaScript date comparison.
Tested on: Node.js v20.18.2. A short note after each runnable snippet describes what you should see in the console.
new Date() for the current instant
Calling new Date() with no arguments produces a Date representing “now.” That is what most guides mean by javascript datetime now or get current date js at the object level—you get both date and time in a single value.
For reproducible documentation, the examples use an explicit UTC instant:
const d = new Date(Date.UTC(2026, 5, 10, 12, 30, 45, 0));Date.UTC builds the same moment you could get from new Date(2026, 5, 10, ...) in a UTC environment; here it avoids tying the article to your laptop’s local time zone.
UTC year, month, and day
When you need a calendar view that does not depend on the host’s default time zone, use the getUTC* getters. Months are still 0-based, so add one when displaying June as 6:
const d = new Date(Date.UTC(2026, 5, 10, 12, 30, 45, 0));
console.log(d.getUTCFullYear());
console.log(d.getUTCMonth() + 1);
console.log(d.getUTCDate());You should see 3 lines, in order: 2026, 6, 10.
Local getFullYear, getMonth, and getDate
For get current date javascript in the user’s or server’s local calendar, call getFullYear(), getMonth(), and getDate() on your Date. They interpret the same instant in the host time zone, so they can disagree with the getUTC* trio around midnight or across zones. Remember getMonth() returns 0 for January through 11 for December.
Milliseconds with getTime()
getTime() returns the numeric UTC milliseconds since 1 January 1970 UTC, which is handy for logging and APIs:
const d = new Date(Date.UTC(2026, 5, 10, 12, 30, 45, 0));
console.log(d.getTime());You should see one line logging 1781094645000.
A fixed-width YYYY-MM-DD in UTC
A simple way to emit an ISO-style calendar date in UTC is to combine UTC getters with padStart:
const d = new Date(Date.UTC(2026, 5, 10, 12, 30, 45, 0));
const y = d.getUTCFullYear();
const mo = String(d.getUTCMonth() + 1).padStart(2, "0");
const day = String(d.getUTCDate()).padStart(2, "0");
console.log(`${y}-${mo}-${day}`);You should see one line logging 2026-06-10.
ISO strings: toISOString() and toJSON()
Both methods yield a normalized UTC string suitable for JSON and backends. toJSON() is specified to behave like toISOString() for Date instances:
const d = new Date(Date.UTC(2026, 5, 10, 12, 30, 45, 0));
console.log(d.toISOString());
console.log(d.toJSON());You should see 2 lines, in order: 2026-06-10T12:30:45.000Z, 2026-06-10T12:30:45.000Z.
Locale output with a pinned time zone
Bare toLocaleDateString() depends on the runtime default locale and zone. Pass timeZone: "UTC" (or any IANA name you support) so readers in different regions still see the intended example:
const d = new Date(Date.UTC(2026, 5, 10, 12, 30, 45, 0));
console.log(d.toLocaleDateString("en-US", { timeZone: "UTC" }));You should see one line logging 6/10/2026.
For richer labels, Intl.DateTimeFormat keeps the same instant but controls weekday, month length, and clock fields—still with an explicit zone:
const d = new Date(Date.UTC(2026, 5, 10, 12, 30, 45, 0));
const formatter = new Intl.DateTimeFormat("en-US", {
weekday: "long",
year: "numeric",
month: "long",
day: "numeric",
hour: "numeric",
minute: "numeric",
second: "numeric",
timeZone: "America/New_York",
});
console.log(formatter.format(d));You should see one line logging Wednesday, June 10, 2026 at 8:30:45 AM.
For deeper patterns—dateStyle / timeStyle, formatToParts, and common errors—see JavaScript date formatting with Intl.DateTimeFormat.
Date.now() and new Date().getTime() stay aligned
For the live clock, Date.now() returns the same millisecond value you would read from new Date().getTime() in the same turn of the event loop:
console.log(Math.abs(Date.now() - new Date().getTime()) < 100);You should see one line logging true.
Summary
Getting the current date in javascript is usually a choice between new Date() for a rich instance API versus Date.now() when you only need epoch milliseconds. Readers ask how to format for a locale or time zone—combine the instance with Intl.DateTimeFormat or helpers from date formatting in JavaScript, and remember that Date objects are always an instant in UTC internally even when you print local strings.
Another FAQ is how to compare or sort dates safely; once you have numeric milliseconds, comparisons behave like ordinary numbers, but you should still normalize user input strings through Date.parse or explicit parsers. For epoch utilities and conversions, pair this page with JavaScript generate timestamp and JavaScript date comparison.
