Created
January 6, 2017 23:16
-
-
Save EncodeTheCode/6ca659dae8ee352cc54a6137320e1cd5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function output(c){document.write(c);} | |
function cut(w,s,e){return w.slice(s,e);} | |
function date_(){ | |
var date=new Date(); | |
var c=date.getDay(); | |
var date=date.toDateString(); | |
var d1=date.indexOf("Mon"); | |
var d2=date.indexOf("Tue"); | |
var d3=date.indexOf("Wed"); | |
var d4=date.indexOf("Thu"); | |
var d5=date.indexOf("Fri"); | |
var d6=date.indexOf("Sat"); | |
var d7=date.indexOf("Sun"); | |
var m1=date.indexOf("Jan"); | |
var m2=date.indexOf("Feb"); | |
var m3=date.indexOf("Mar"); | |
var m4=date.indexOf("Apr"); | |
var m4=date.indexOf("May"); | |
var m5=date.indexOf("Jun"); | |
var m6=date.indexOf("Jul"); | |
var m7=date.indexOf("Aug"); | |
var m8=date.indexOf("Sep"); | |
var m9=date.indexOf("Oct"); | |
var m10=date.indexOf("Nov"); | |
var m11=date.indexOf("Dec"); | |
if(d1==0){d="Monday";} | |
if(d2==0){d="Tuesday";} | |
if(d3==0){d="Wednesday";} | |
if(d4==0){d="Thursday";} | |
if(d5==0){d="Friday";} | |
if(d6==0){d="Saturday";} | |
if(d7==0){d="Sunday";} | |
if(m1==4){m="January";} | |
if(m2==4){m="February";} | |
if(m3==4){m="Mars";} | |
if(m4==4){m="April";} | |
if(m5==4){m="May";} | |
if(m6==4){m="June";} | |
if(m7==4){m="July";} | |
if(m8==4){m="August";} | |
if(m9==4){m="September";} | |
if(m10==4){m="November";} | |
if(m11==4){m="December";} | |
date=d+" "+m+" "+c+" "+cut(date,10,15); | |
return date; | |
} | |
output(date_()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment