Javascript calculate date week by week -
hy guys, have write javascript code calculate date day of week progressively. ahve error when code must calculate end of month: example after 31/07/2'15 code generate 32/07/2015 instead 01/08/2015. code:
var application = this; var currentdate = new date(); var stringdate1 = currentdate.getutcdate() + "/" + (currentdate.getmonth() + 1) + "/" + currentdate.getfullyear(); var stringdate2 = (currentdate.getutcdate()+1) + "/" + (currentdate.getmonth() + 1) + "/" + currentdate.getfullyear(); var stringdate3 = (currentdate.getutcdate() + 2) + "/" + (currentdate.getmonth() + 1) + "/" + currentdate.getfullyear(); var stringdate4 = (currentdate.getutcdate() + 3) + "/" + (currentdate.getmonth() + 1) + "/" + currentdate.getfullyear(); var stringdate5 = (currentdate.getutcdate() + 4) + "/" + (currentdate.getmonth() + 1) + "/" + currentdate.getfullyear(); var stringdate6 = (currentdate.getutcdate() + 5) + "/" + (currentdate.getmonth() + 1) + "/" + currentdate.getfullyear(); var stringdate7 = (currentdate.getutcdate() + 6) + "/" + (currentdate.getmonth() + 1) + "/" + currentdate.getfullyear();
where code wrong? please? br
just add hours*minutes*seconds*milliseconds
today's date, , tomorrow's date, , on.
var tomorrowsdate = new date(new date().gettime() + 24 * 60 * 60 * 1000);
Comments
Post a Comment