I am trying to make a Calendar/Appointments device. Clearly, date and time storage are significant. TIme of day can readily be stored in a byte at 10 minute intervals. Date is more involved. I found this post describing a modified Julian Date Number (JDN) calculation which covers the years 2000-2178 in one word.
So far so good. My problem is to restore Day, Month and Year from the modified JDN. Wikipedia describes a method to restore Gregorian dates (I hope that's the correct one!) but it's very complex and I can't get it to work on a spreadsheet, never mind making it Picaxeable.
Has anyone tackled this problem with a Picaxe before? Is there an alternative approach that I should consider? Or must I persevere with the Wikipedia method until it yields?
Derek
So far so good. My problem is to restore Day, Month and Year from the modified JDN. Wikipedia describes a method to restore Gregorian dates (I hope that's the correct one!) but it's very complex and I can't get it to work on a spreadsheet, never mind making it Picaxeable.
Has anyone tackled this problem with a Picaxe before? Is there an alternative approach that I should consider? Or must I persevere with the Wikipedia method until it yields?
Derek