-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdate.js
More file actions
16 lines (12 loc) · 555 Bytes
/
date.js
File metadata and controls
16 lines (12 loc) · 555 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var myDate = new Date();
var day = myDate.getDay();
var month = myDate.getMonth();
var date = myDate.getDate();
var days = ["SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"];
var months = ["JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER"];
var a = days[day] + ", " + months[month] + " " + date;
//console.log(a);
document.getElementById("date").innerHTML = a;
/*console.log(days[day]);
console.log(months[month]);
console.log(date);*/