displays the date's day of the week, month, day of the month, and year in locale

Description

toLocaleDateString() displays the date's day of the week, month, day of the month, and year.

Example


var aDate = new Date(Date.UTC(2021, 5, 4, 12, 21, 55)); 
console.log(aDate.toLocaleDateString()); 

The code above generates the following result.





















Home »
  Javascript »
    Javascript Reference »




Array
Canvas Context
CSSStyleDeclaration
CSSStyleSheet
Date
Document
Event
Global
History
HTMLElement
Input Element
Location
Math
Number
String
Window