hazelchaz: (0)
Chaz Boston Baden ([personal profile] hazelchaz) wrote in [personal profile] billroper 2004-06-18 07:04 am (UTC)

While I looked around at my possibilities

and your boss is so hard to please.

I assume you have a set of serial date conversion library subroutines? Gods bless Zeller.

(Serial date is sometimes misnamed Julian Date. Zeller's Congruence is named after the mathematician who noticed that if you start the year with March and end it in February, it's easier to calculate dates because there are 30.6 days per month and you just round off to get the appropriate whole number of days. Example, rounding off you get 31 days for March; 30.6x2 = 61.2 = 61 for March+April, and so on. The nice thing about that is you can work it in reverse... you still need to do the 365.25 days per year calculation, but once you've determined the start of the year - that is, March 1 - you can divide by 30.6, add a fudge factor and round down to get the number of months, and so on.)

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org