Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Dates</h1>
<h2>The toLocaleString() Method</h2>
<p>Format a date into a string using a language specific format.</p>
<p id="demo"></p>
<script>
const n = new Date();
let text = "";
text += "<p>ar-SA: " + n.toLocaleString("ar-SA");
text += "<p>bn-BD: " + n.toLocaleString("bn-BD");
text += "<p>bn-IN: " + n.toLocaleString("bn-IN");
text += "<p>cs-CZ: " + n.toLocaleString("cs-CZ");
text += "<p>da-DK: " + n.toLocaleString("da-DK");
text += "<p>de-AT: " + n.toLocaleString("de-AT");
text += "<p>de-CH: " + n.toLocaleString("de-CH");
text += "<p>de-DE: " + n.toLocaleString("de-DE");
text += "<p>el-GR: " + n.toLocaleString("el-GR");
text += "<p>en-AU: " + n.toLocaleString("en-AU");
text += "<p>en-CA: " + n.toLocaleString("en-CA");
text += "<p>en-GB: " + n.toLocaleString("en-GB");
text += "<p>en-IE: " + n.toLocaleString("en-IE");
text += "<p>en-IN: " + n.toLocaleString("en-IN");
text += "<p>en-NZ: " + n.toLocaleString("en-NZ");
text += "<p>en-US: " + n.toLocaleString("en-US");
text += "<p>en-ZA: " + n.toLocaleString("en-ZA");
text += "<p>es-AR: " + n.toLocaleString("es-AR");
text += "<p>es-CL: " + n.toLocaleString("es-CL");
text += "<p>es-CO: " + n.toLocaleString("es-CO");
text += "<p>es-ES: " + n.toLocaleString("es-ES");
text += "<p>es-MX: " + n.toLocaleString("es-MX");
text += "<p>es-US: " + n.toLocaleString("es-US");
text += "<p>fa-IR: " + n.toLocaleString("fa-IR");
text += "<p>fi-FI: " + n.toLocaleString("fi-FI");
text += "<p>fr-BE: " + n.toLocaleString("fr-BE");
text += "<p>fr-CA: " + n.toLocaleString("fr-CA");
text += "<p>fr-CH: " + n.toLocaleString("fr-CH");
text += "<p>fr-FR: " + n.toLocaleString("fr-FR");
text += "<p>he-IL: " + n.toLocaleString("he-IL");
text += "<p>hi-IN: " + n.toLocaleString("hi-IN");
text += "<p>hu-HU: " + n.toLocaleString("hu-HU");
text += "<p>id-ID: " + n.toLocaleString("id-ID");