If you want to you can add days, minutes etc. to a date to change it. Add this to dates.html:
var myDate=new Date('January 16, 1988'); myDate.setDate(myDate.getDate()+1); alert(myDate);
This creates a date then changes one part by adding 1. The second line might not make sense at first but keep looking:
- the bit in brackets is run first and it:
- gets the current date part
- adds 1 to that
- that new value is then stored in myDate by using the setDate method
You could have added years or seconds instead.
There are now quite a few dates in date.html so you might want to comment the various lines of code (or at least the blocks) so that it is clear what each one shows.