View Single Post
Old 02-25-2008, 02:08 PM   #15 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,114
Belisarius is on a distinguished road
Why not simply add 213 to the previous number? If the result is more than 999 simply wrap around to 000. For instance, say I enter in 850 for the previous midday number and don't enter anything in for the evening number - one of the "projected" numbers would be 1063. Because that's bigger than 999, we simply "wrap around" (also called 'mod' or 'modulo' in math/computer speak), and get 063.

Would that work?
__________________
GitS
Belisarius is offline   Reply With Quote