We add a day for the years where appropriate (divisible by 4, not centuries,
unless century is divisible by 400) :)

Charles Daminato
OpenSRS Product Manager
Tucows Inc. - [EMAIL PROTECTED]

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Chip Paswater
> Sent: July 4, 2001 5:40 AM
> To: [EMAIL PROTECTED]
> Subject: How does OpenSRS do dates?
>
>
> I've seen mentioned here that OpenSRS tracks expirations by the second.
> I'm wondering how you guys handle leap years and such.
>
> For example, I'm pondering ways to create a billing system for my domains
> and clients.  Seconds seems like a good measure, but how do I measure a
> month?  since some a 31 days and some are 30.. I could keep a table, and
> multiply 60 * 60 * 24 * (28|29|30|31).  Plus, how do you handle
> leap years?
> Do you make every year 365.25 days or do you just add 1 day every 4 years?
>
> with no leap year, 1 month is 30.4166666666667 days
>
> on a leap year, 1 month is 30.5 days
>
> if a year is 365.25 days, a month becomes 30.4375 days
>
> How do you guys cope with these issues?
>
>

Reply via email to