Open In App

JavaScript Intl DateTimeFormat format() Method

Last Updated : 12 Jul, 2025
Comments
Improve
Suggest changes
2 Likes
Like
Report

The Intl.DateTimeFormat format() method in JavaScript formats dates and times according to a specified locale and options. It allows you to customize the output with settings for timezone, date, time, and more, making it ideal for creating locale-sensitive and readable date-time strings.

Syntax: 

Intl.dateTimeFormat.format( date )

Parameters: This method accepts a single parameter as mentioned above and described below: 

  • date: This parameter holds the date which needs to format.

The below examples illustrate the Intl.DateTimeFormat.prototype.format() method in JavaScript:

Example 1: In this example, we will print the specific dates, and days in three different languages and one modified pattern.

Output:

"बुधवार, 30 जुलाई 1997"
"Wednesday, 30 July 1997"
"среда, 30. јул 1997."
"Wednesday, July 30, 1997"

Example 2: In this example, we will print the specific dates, and days in three different languages.

Output:

"सितंबर 2012 <-> दिसंबर 2012 <-> अप्रैल 2012"
"Eylül 2012 ; Aralık 2012 ; Nisan 2012"
"2012 m. rugsėjis :: 2012 m. gruodis :: 2012 m. balandis"

We have a complete list of Javascript Intl methods, to check those please go through the Javascript Intl Complete Reference article.

Supported Browsers: The browsers supported by Intl.DateTimeFormat.prototype.format() method are listed below: 


Similar Reads