what date is it tomorrow???


i have curious problem... i'm looking way tomorrows date.
building "simple" function adds 1 day more complicated seems.

it needs know how many days in month, amount of days in february. 31st of december should increment year etc...
it manageable there might easier way?

in javascript do:

code: [select]
var mydate = new date();

//add day date
mydate.setdate(mydate.getdate() + 1);


any suggestions???

p.s. while writing post stumbled accross: http://alcor.concordia.ca/~gpkatch/gdate-algorithm.html might usefull if no "out of box solution missed" exists :)

quote
but there might easier way?
convert current time , date unix time. add 86400 seconds. convert back. use date. time libraries support converting , unix time. if yours doesn't, need better one.


Arduino Forum > Using Arduino > Programming Questions > what date is it tomorrow???


arduino

Comments