toLocaleString() formats both the date and time of a Date for human readers using locale rules. Pass a language tag and options for presets, 12/24-hour clocks, and IANA time zones—ideal for activity feeds, order history, and multilingual apps.
01
Syntax
locales, options
02
Date + time
Full label
03
Styles
date/timeStyle
04
hour12
AM/PM vs 24h
05
timeZone
IANA zones
06
Invalid
“Invalid Date”
Fundamentals
Introduction
When users see “last updated” timestamps or meeting times, they expect familiar date-and-time text—not raw ISO strings. toLocaleString() uses the Intl engine to produce readable labels that respect language and regional conventions.
UTC: Mar 15, 2026, 6:00 PM
America/New_York: Mar 15, 2026, 2:00 PM
Asia/Tokyo: Mar 16, 2026, 3:00 AM
How It Works
The stored instant never changes—only the displayed local date and time shift with the zone. Store ISO; format with timeZone at render time.
Applications
🚀 Common Use Cases
Activity feeds — “Posted Mar 15, 2026, 2:30 PM” in the user’s locale.
Order history — purchase timestamps with dateStyle: 'medium'.
Meeting invites — show start time in each attendee’s timeZone.
Admin dashboards — switch locale when staff change language preference.
Chat messages — compact timeStyle: 'short' beside full date on hover.
Audit logs (UI) — human-readable view while JSON logs keep ISO underneath.
🧠 How toLocaleString() Builds the Label
1
Resolve locale
Engine picks the BCP 47 tag from the argument or runtime default.
locale
2
Apply time zone
Local zone or timeZone option sets calendar and clock fields.
TZ
3
Intl formatting
Options or style presets map to Intl date and time parts.
Intl
4
🕐
Return string
A localized date+time label is returned; the Date object is unchanged.
Important
📝 Notes
Includes both date and time—unlike toLocaleDateString().
Read-only: does not mutate the Date.
Output varies by locale, options, and time zone—do not parse it back to dates in production.
Store ISO or epoch; format with toLocaleString() at display time.
Invalid dates return "Invalid Date".
Avoid mixing dateStyle/timeStyle with conflicting granular field options in one call.
Compatibility
Browser & Runtime Support
Date.prototype.toLocaleString() with locales and options is widely supported via Intl in modern environments.
✓ Baseline · Intl
Date.prototype.toLocaleString()
Supported in Chrome, Firefox, Safari, Edge, and Node.js. Very old browsers had limited locale support; target modern baselines for rich options.
98%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.toLocaleString()Excellent
Bottom line: Safe for modern apps. Remember date+time scope, locale variance, and ISO for storage.
Wrap Up
Conclusion
toLocaleString() is the go-to formatter when users need to see both calendar date and clock time in a familiar regional style. Combine locales, style presets, and timeZone to build inclusive, readable UIs.
Format at display time from stored ISO or epoch values
Use dateStyle + timeStyle for consistent presets
Set timeZone for remote teams and scheduled events
Pass explicit locales when your app supports language switching
Set hour12 when your UI requires a fixed clock style
❌ Don’t
Store locale-formatted strings as your source of truth
Parse toLocaleString() output with regex
Use it for API payloads instead of toISOString()
Assume all locales use 12-hour time without checking hour12
Mix style presets with conflicting field options in one call
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about Date.toLocaleString()
Your foundation for locale-aware date-and-time labels.
5
Core concepts
📝01
Syntax
locales + options
API
🕐02
Date + time
Full label.
Scope
📋03
Styles
date/timeStyle.
Presets
🕓04
hour12
AM/PM vs 24h.
Clock
🌐05
timeZone
IANA names.
Regions
❓ Frequently Asked Questions
A string with both the date and time portions of the Date formatted for a locale — for example, "3/15/2026, 2:30:00 PM" in en-US. It is meant for human-readable display, not API storage.
toLocaleString() includes date and time. toLocaleDateString() includes only the calendar date. Use toLocaleTimeString() when you need time alone.
Pass hour12: true or hour12: false in the options object, or use timeStyle presets that follow locale defaults.
Yes. Options like { dateStyle: 'full', timeStyle: 'short' } are a convenient way to format both parts without listing every field.
By default it uses the runtime local time zone. Set the timeZone option (for example, 'UTC' or 'Europe/Berlin') to format the instant as it appears in another zone.
It returns the string "Invalid Date". Validate with Number.isNaN(date.getTime()) before formatting in UI code.
Did you know?
Number.prototype.toLocaleString() is a different method—it formats numbers with locale grouping separators. On Date objects, toLocaleString() always refers to date-and-time formatting via Intl.