piclist 2001\01\10\004151a >
Thread: Time diff code
face BY : rich+piclistTakeThisOuT@LCLOGIC.COM

> 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 STOPspamlistserv.....spam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


In reply to: <B8D86AD9E6D2D3119C8B004005A082FB329290@EXCHANGE>
See also: www.piclist.com/techref/microchip/time.htm?key=time
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Time diff code

month overview.

new search...