Today date in arabic format: <samp></samp>
<br />
<br />
Date '2015/04/22' in Bengali format: <samp></samp>
<br />
<br />
Date '2015/04/22' in Iranian Persian format: <samp></samp>
body{
font-family: bookman old style;
font-size: 14pt;
}
samp{
color: CRIMSON;
font-weight: bold;
}
var formatter = new Intl.DateTimeFormat('ar'),
// Arabic
output = formatter.format(),
samps = document.querySelectorAll('samp');
samps[0].textContent = output
/* returned "٢٢/٤/٢٠١٥", the current date(since no date was given as input) in arabic */
var mydate = new Date('2015/04/22');
samps[1].textContent = new Intl.DateTimeFormat('bn').format(mydate);
// Bengali, returns "২২/৪/২০১৫"
samps[2].textContent = new Intl.DateTimeFormat('fa-pes').format(mydate);
// Iranian Persian, returns "۱۳۹۴/۲/۲ ه.ش."
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.