Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
7
Task/Date-format/JavaScript/date-format.js
Normal file
7
Task/Date-format/JavaScript/date-format.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
var now = new Date(),
|
||||
weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
fmt1 = now.getFullYear() + '-' + (1 + now.getMonth()) + '-' + now.getDate(),
|
||||
fmt2 = weekdays[now.getDay()] + ', ' + months[now.getMonth()] + ' ' + now.getDate() + ', ' + now.getFullYear();
|
||||
console.log(fmt1);
|
||||
console.log(fmt2);
|
||||
Loading…
Add table
Add a link
Reference in a new issue