You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
programming-examples/js/Date/Write a JavaScript function...

12 lines
361 B
JavaScript

Date.longMonths = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
function full_month(dt)
{
return Date.longMonths[dt.getMonth()];
}
dt = new Date();
console.log(full_month(dt));
dt = new Date(2015, 10, 1);
console.log(full_month(dt));