Hello Chip,
Wednesday, July 04, 2001, 2:39:59 AM, Chip Paswater wrote:
> 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
I can only say how I handle it.
A month is a calendar month, always, as far as I am concerned.
For those services that start on the 31st, and the next month is a 30
day month, the anniversary is the 30th.
A year is a calendar year. This year that is 365 days. In 2004 that
will be 366 days. If a service is signed up for on 29-Feb-2004, for
one year, it will expire on 28-Feb-2005 as far as I am concerned.
But then I am moving away from any "monthly" billings at all, and
instead billing all services based on "Quarters."
Quarters run Jan-Mar, Apr-Jun, Jul-Sep, Oct-Dec. A customer's initial
period is for 3 months, and then I prorate the remain period (take the
number of days that month divide the monthly rate by that number of
days, multiply the result times the days being charged for that
month) to bring them up to the end of the current quarter.
That amount is calculated at signup, and if the # of days is under 30,
then it is just added to the next regular quarterly invoice for
simplicity sake.
--
Best regards,
William X Walsh <[EMAIL PROTECTED]>
Userfriendly.com Domains
The most advanced domain lookup tool on the net
DNS Services from $1.65/mo