A date sample in BC: <samp></samp>
<br />
<br />
Date '2015/04/22' in en-US format with options: <samp></samp>
body {
font-family: bookman old style;
font-size: 14pt;
}
samp {
color: CRIMSON;
font-weight: bold;
}
var mydate = new Date(-80, 09, 07),
options = {
weekday: 'short',
year: "numeric",
month: "long",
day: "numeric",
era: "short"
},
samps = document.querySelectorAll('samp');
samps[0].textContent = new Intl.DateTimeFormat('en-US', options).format(mydate);
// returns "Thu, October 7, 81 BC"
mydate = new Date('2015/04/22');
options = {
weekday: "short",
year: "numeric",
month: "long",
day: "numeric"
};
samps[1].textContent = new Intl.DateTimeFormat('en-US', options).format(mydate);
// returns "Wed, April 22, 2015"
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.