getMinutes() returns the minute component as an integer from 0 to 59 in local time. This guide covers syntax, five examples, UTC comparisons, validation, clock formatting, and reminder patterns.
01
Syntax
date.getMinutes()
02
Range
0 – 59
03
Local time
Not UTC
04
With hours
Build HH:MM
05
Reminders
Match :30
06
Validate
Invalid → NaN
Fundamentals
Introduction
Clocks, countdowns, and “meeting starts at :30” labels need the minute part of a Date. The getMinutes() method returns that value as an integer using the user’s local timezone.
Pair it with getHours() to build HH:MM displays, or use toLocaleTimeString() when locale formatting is enough.
Concept
Understanding the getMinutes() Method
Date.prototype.getMinutes() is a zero-argument instance method. It never mutates the original Date—it only reads the minute component within the current hour in local time.
On a time like 14:30:45, getHours() returns 14 and getMinutes() returns 30. Seconds and milliseconds come from their own getters.
💡
Beginner Tip
For display, pad single-digit minutes: String(m).padStart(2, "0") turns 5 into "05" so 9:05 does not show as 9:5.
Foundation
📝 Syntax
JavaScript
dateObj.getMinutes()
Parameters
None.
Return value
Integer 0–59 for a valid date in local time.
NaN if dateObj is an invalid Date.
Cheat Sheet
⚡ Quick Reference
Goal
Code
Current minutes
new Date().getMinutes()
Minutes from fixed time
new Date(2026, 6, 4, 14, 30).getMinutes() → 30
UTC minutes
date.getUTCMinutes()
Pad for clock
String(m).padStart(2, "0")
Set minutes
date.setMinutes(45)
Valid date check
!Number.isNaN(date.getTime())
Compare
📋 getMinutes() vs Similar Methods
Time getters split one instant into parts. Use the getter that matches the field you need.
getMinutes()
0–59
Local minutes
getUTCMinutes()
UTC min
Timezone-safe read
getHours()
0–23
Hour part
getSeconds()
0–59
Second part
Hands-On
Examples Gallery
Open DevTools Console (F12) or use Try-it links. Fixed times use new Date(y, m, d, h, min) for predictable local values.
📚 Getting Started
Read the minute component from the current time.
Example 1 — Get the Current Minutes
Call getMinutes() on a new Date() to read the minute right now.
JavaScript
const now = new Date();
const minutes = now.getMinutes();
console.log("Current minutes:", minutes);
Minute-only checks ignore seconds. For exact timestamps, also compare hours or use getTime() against a target instant.
Applications
🚀 Common Use Cases
Digital clocks — show HH:MM with padded minutes.
Meeting times — “starts at :30” labels from event dates.
Cron-like UI — trigger when getMinutes() === 0.
Pomodoro apps — track 25-minute blocks via minute math.
Analytics — bucket activity by minute of hour.
Form defaults — pre-fill minute dropdowns on time pickers.
🧠 How getMinutes() Resolves the Value
1
Internal instant
The Date stores milliseconds since Unix epoch (UTC).
Storage
2
Local conversion
Engine applies the runtime timezone offset.
TZ
3
Extract minutes
Minute 0–59 within the current hour is returned.
getMinutes
4
🕐
Use in UI
Format, compare, schedule, or pass to setMinutes.
Important
📝 Notes
getMinutes() is local; use getUTCMinutes() when you standardize on UTC.
Range is 0–59 only for valid dates.
Invalid dates propagate NaN—validate first.
Pad minutes when building fixed-width clock strings.
Minute-only rules ignore seconds—combine getters for precision.
For display, prefer toLocaleTimeString() or Intl.DateTimeFormat.
Compatibility
Browser & Runtime Support
Date.prototype.getMinutes() has been available since the first JavaScript Date implementation (ES1). It works in every browser and Node.js.
✓ Baseline · ES1
Date.prototype.getMinutes()
Supported in Chrome, Firefox, Safari, Edge, Internet Explorer, and all Node.js versions. No polyfill required.
99%Universal API
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
Date.getMinutes()Excellent
Bottom line: Safe everywhere. Watch timezone boundaries when pairing with UTC getters or server timestamps.
Wrap Up
Conclusion
getMinutes() is the standard way to read the minute component (0–59) from a JavaScript Date in local time. Pair it with getHours() for clocks, validate invalid dates, and use setMinutes when you need to write the value.
Next, learn getMonth() for the zero-based month index, or getSeconds() for the second component.
Use locale formatters for user-facing time strings
❌ Don’t
Confuse getMinutes() with getMilliseconds()
Parse ISO strings blindly when teaching fixed local times
Ignore NaN from bad parses
Schedule to the second using minute checks alone
Assume minutes display well without padding
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about Date.getMinutes()
Your foundation for minute reads in JavaScript.
5
Core concepts
📝01
Syntax
date.getMinutes()
API
🔢02
0–59
Per hour.
Range
🌐03
Local
Not UTC.
Timezone
🕐04
HH:MM
With getHours.
Pattern
⚠05
Pad 2
padStart.
Display
❓ Frequently Asked Questions
An integer from 0 to 59 representing the minutes within the current hour of the Date object's local timezone.
getMinutes() uses local timezone rules. getUTCMinutes() reads the UTC minute component. They can differ near hour boundaries across timezones.
getMinutes() returns 0–59 for the minute hand of the clock. getMilliseconds() returns 0–999 for the fraction inside the current second.
NaN. Validate with !Number.isNaN(date.getTime()) before using the result in UI or conditionals.
No for valid dates—the range is 0–59. When minutes overflow via setMinutes, JavaScript normalizes into the next hour.
String(date.getMinutes()).padStart(2, '0') turns 5 into '05' for clock displays like 9:05.
Did you know?
setMinutes(getMinutes() + 15) adds fifteen minutes and rolls into the next hour automatically—the same overflow idea as setDate(getDate() + n) for days.