Purpose: The record shows "Today", "Tomorrow", except for the display of the day.
Reference:
<HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"><title>JS Get Date: The day before yesterday, today, tomorrow, the day after Tomorrow-www.vnote.net</title></Head><Body><Scriptlanguage= "JavaScript"type= "Text/javascript">functionGetdatestr (adddaycount) {varDD= NewDate (); Dd.setdate (Dd.getdate ()+adddaycount);//get the date adddaycount days vary=dd.getfullyear (); varm=Dd.getmonth ()+1;//Gets the date of the current month varD=dd.getdate (); returny+"-"+m+"-"+D;} document.write ("day before yesterday:"+Getdatestr (-2));d Ocument.write ("<br/> Yesterday:"+Getdatestr (-1));d Ocument.write ("<br/> Today:"+Getdatestr (0));d Ocument.write ("<br/> Tomorrow:"+Getdatestr (1));d Ocument.write ("<br/> Day After Tomorrow:"+Getdatestr (2));d Ocument.write ("<br/> The day after tomorrow:"+Getdatestr (3));</Script></Body></HTML>
What I need after the change:
JS Get today tomorrow