JavaScript Date Methods

Beginner
6 min read
Updated: Nov 2026
46 method guides
Method index

About This Index

This page is the JavaScript Date Methods index for the tutorial track. Each row links to a full guide with syntax, examples, and FAQs.

Learn what a Date is on /js/date. Use this page when you need a specific API such as getFullYear(), getMonth(), or toISOString().

Beginner path.

Start with getFullYear(), getMonth(), toISOString(), and Date.now()—then browse local getters, UTC methods, and setters.

How to Call a Date Method

Instance methods use a dot; static helpers use Date:

JavaScript
const birthday = new Date(2026, 0, 15);

// Instance (Date.prototype)
birthday.getFullYear();   // 2026
birthday.getMonth();      // 0
birthday.toISOString();   // UTC string

// Static (on Date)
Date.now();                              // current ms
Date.UTC(2026, 0, 15);                   // UTC timestamp
Date.parse("2026-01-15T00:00:00.000Z");  // ms or NaN

JavaScript Date Methods Table

All method guides in this JavaScript tutorial series (46 tutorials).

Getting Started

4 methods

Create timestamps and read core Date concepts first.

MethodDescriptionTutorial
Date.now()Returns the current timestamp in milliseconds since the Unix epoch.Open
Date.parse()Parses a date string and returns milliseconds since 1 Jan 1970 UTC, or NaN if invalid.Open
Date.UTC()Builds a UTC timestamp from year, month, day, and optional time parts.Open
getTime()Returns milliseconds since 1 Jan 1970 UTC — the internal timestamp.Open

Local Getters

9 methods

Read date and time parts in the user's local timezone.

MethodDescriptionTutorial
getDate()Returns the day of the month (1–31) in local time.Open
getDay()Returns the day of the week (0 = Sunday … 6 = Saturday) in local time.Open
getFullYear()Returns the four-digit year in local time.Open
getMonth()Returns the month index (0 = January … 11 = December) in local time.Open
getHours()Returns the hour (0–23) in local time.Open
getMinutes()Returns the minutes (0–59) in local time.Open
getSeconds()Returns the seconds (0–59) in local time.Open
getMilliseconds()Returns the milliseconds portion (0–999) in local time.Open
getTimezoneOffset()Returns local offset from UTC in minutes (positive west of UTC).Open

UTC Getters

8 methods

Read components in Coordinated Universal Time.

MethodDescriptionTutorial
getUTCDate()Returns the day of the month (1–31) in UTC.Open
getUTCDay()Returns the day of the week (0–6) in UTC.Open
getUTCFullYear()Returns the four-digit year in UTC.Open
getUTCMonth()Returns the month index (0–11) in UTC.Open
getUTCHours()Returns the hour (0–23) in UTC.Open
getUTCMinutes()Returns minutes (0–59) in UTC.Open
getUTCSeconds()Returns seconds (0–59) in UTC.Open
getUTCMilliseconds()Returns milliseconds (0–999) in UTC.Open

Local Setters

8 methods

Change date and time parts in local time (mutates the object).

MethodDescriptionTutorial
setDate()Sets the day of the month in local time; mutates the Date object.Open
setFullYear()Sets the year (and optionally month and date) in local time.Open
setMonth()Sets the month index in local time; may roll the day if needed.Open
setHours()Sets the hour and optionally minutes, seconds, and ms in local time.Open
setMinutes()Sets minutes and optionally seconds and ms in local time.Open
setSeconds()Sets seconds and optionally milliseconds in local time.Open
setMilliseconds()Sets the milliseconds component in local time.Open
setTime()Sets the date from a millisecond timestamp since the epoch.Open

UTC Setters

7 methods

Change components in UTC.

MethodDescriptionTutorial
setUTCDate()Sets the day of the month in UTC.Open
setUTCFullYear()Sets the year in UTC, optionally with month and date.Open
setUTCMonth()Sets the month index in UTC.Open
setUTCHours()Sets the hour in UTC, optionally with minutes, seconds, and ms.Open
setUTCMinutes()Sets minutes in UTC, optionally seconds and ms.Open
setUTCSeconds()Sets seconds in UTC, optionally milliseconds.Open
setUTCMilliseconds()Sets the milliseconds component in UTC.Open

Formatting & Conversion

10 methods

Turn Date objects into strings for display or APIs.

MethodDescriptionTutorial
toISOString()Returns an ISO 8601 UTC string — ideal for APIs and JSON.Open
toLocaleString()Formats date and time using locale-specific rules.Open
toLocaleDateString()Formats the date portion using locale-specific rules.Open
toLocaleTimeString()Formats the time portion using locale-specific rules.Open
toDateString()Returns a human-readable date string (weekday, month, day, year).Open
toTimeString()Returns a human-readable time string with timezone info.Open
toUTCString()Returns a UTC date/time string in HTTP-style format.Open
toString()Returns a default string representation of the date and time.Open
toJSON()Returns an ISO string; used when JSON.stringify serializes a Date.Open
valueOf()Returns the primitive millisecond timestamp (same as getTime()).Open

Frequently Asked Questions

Date methods read or change a moment, or format it as text. Instance methods such as getFullYear(), getMonth(), and toISOString() use a dot on a Date. Static methods use Date itself: Date.now(), Date.parse(), and Date.UTC().
The Date page teaches what a Date is—new Date(), zero-based months, UTC, and mutable setters. This Methods index lists every method tutorial so you can open getFullYear(), toISOString(), and the rest.
Instance methods use a dot: birthday.getFullYear(), birthday.toISOString(). Static methods use Date: Date.now(), Date.parse("2026-01-15T00:00:00Z").
Yes. setDate(), setMonth(), and the other setters mutate that object and return the new millisecond timestamp. Copy with new Date(date.getTime()) before you change a second value.
If you are new, read JavaScript Date first. Then open getFullYear(), getMonth(), toISOString(), and Date.now() from the tables below.

Start with Date.now()

Open the timestamp guide—syntax, examples, and FAQs.

Date.now() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

12 people found this page helpful