Time diff code
> The trick is to create an algorithm to test the two sets of values to see if
> ten minutes or less has passed. This has to take into account leap years, 30
> and 31 day months, change of century (e.g. 2000 to 2001), etc.
You didn't say... is it possible to go more than 24 hours without wakeup?
If no, then if the dates don't match it must be the next day, you only
need to check old_time_until_midnight + current_time_since_midnight.
Otherwise, maybe 'Zeller Congruence' will yield a clue == Rich
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email mitvma.mit.edu with SET PICList DIGEST in the body listserv
In reply to: <B8D86AD9E6D2D3119C8B004005A082FB329290@EXCHANGE>
See also: www.piclist.com/techref/microchip/time.htm?key=time
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the