How to Date Display with JavaScript Snippets

Date Display with JavaScript

Date Display with JavaScript

You can use this snippet to display the current date in this format: Sunday, February 19, 2017. Just paste the following code where you want the date display on your page:

var now = new Date();

var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;
today =  days[now.getDay()] + ", " +
        months[now.getMonth()] + " " +
        date + ", " +
        (fourdigits(now.getYear())) ;



Tags: JavaScript, Date Display with JavaScript. Date Display, macbook air retina display release date, retina display release date, javascript display date, digital clock date and time display

About Masum Billah

Date Display with JavaScript 1stWebSuite website seo tool is a free website ranking tool site provides a lot of on page and off page seo useful tools for you. On this site, we have a large number of website ranking tools

Discuss about: How to Date Display with JavaScript Snippets

Newsletter Subscription

Enter your email address:

Delivered by FeedBurner

Recently Viewed Items