getters
Date.prototype.getMinutes
Returns the minutes portion of the date in LOCAL time as an integer from 0 to 59. The identically shaped getSeconds (0-59) and getMilliseconds (0-999) round out the sub-hour getters.
date.getMinutes() Parameters
| Parameter | Purpose |
|---|---|
| () | no arguments; returns 0-59 |
| getSeconds() | 0-59 seconds portion |
| getMilliseconds() | 0-999 ms portion |
Examples
console.log(new Date('2026-07-19T15:30:45.123Z').getUTCMinutes()); // 30 just the minutes
console.log(new Date('2026-07-19T15:30:45.123Z').getUTCSeconds()); // 45 seconds companion
console.log(new Date('2026-07-19T15:30:45.123Z').getUTCMilliseconds()); // 123 ms companion
Gotcha
Local minutes can differ from UTC minutes in timezones with 30- or 45-minute offsets (e.g. India UTC+05:30, Nepal UTC+05:45).
Related
Date.prototype.getHours
Returns the hour of the date in LOCAL time as an integer from 0 to 23. Companion methods getMinutes, getSeconds, and getMilliseconds work the same way for their respective units.
Date.prototype.getTime
Returns the underlying timestamp of the date as milliseconds since the Unix epoch (1970-01-01T00:00:00Z). This is the canonical way to compare, subtract, or serialize a Date as a number.
Date.prototype.getTimezoneOffset
Returns the difference between UTC and the host's local time in MINUTES with the SIGN REVERSED from the conventional offset. So India (UTC+05:30) returns -330 and New York in EST (UTC-05:00) returns 300.
Date.prototype.getFullYear
Returns the 4-digit year of the date according to LOCAL time. Prefer this over the deprecated getYear(), which returns year-1900.
Date.prototype.getMonth
Returns the month of the date in LOCAL time as an integer from 0 (January) to 11 (December). This zero-based indexing is the single most common source of off-by-one date bugs in JavaScript.