How billing cycles progress

Daily cycles are pretty simple: you add N days to the start date and you get the end-date. For single and multiple monthly or yearly cycles, the anniversary date is not in all cases on the same day of the month. It depends on the number of days in a month and if it is a leap year or not.

Monthly cycles

When Billing cycle as calendar month is checked in Configuration > Billing cycles, a billing cycle month is the same as a calendar month.

When Billing cycle as calendar month is unchecked:

  • in case of a monthly cycle, the start of the next billing cycle is determined by adding the number of days of the calendar month when the current cycle ends

  • in case of a multi-month cycle, the start of the next billing cycle is determined by adding the number of days from each month which is part of a billing cycle except the last month.

Billing month example 1

  • Billing cycle as calendar month is unchecked

  • service ordered on May 5th

This is the straightforward scenario. On the every 5th of the month, the old cycle is ended and new cycle is created. Giving the following billing cycles

  • May 5th 00:00:00 - June 4th 23:59:59.99, note that the date and time is in the TIME_ZONE setting timezone

  • June 5th 00:00:00 - July 4th 23:59:59.99

  • and this can go on indefinitely without ever having an invalid date

Billing month example 2

  • Billing cycle as calendar month is unchecked

  • service ordered on December 30th, 2023

Here are the generated billing cycles:

  • December 30th 2022 00:00:00 - January 29th 2023 23:59:59.99, using TIME_ZONE setting timezone

  • January 30th 2023 00:00:00 - March 1st 2023 23:59:59.99

  • March 2nd 2023 00:00:00 - April 1st 2023 23:59:59.99

  • April 2nd 2023 00:00:00 - May 1st 2023 23:59:59.99

  • following cycles will all start on the 2nd of the month

Wait! But where does that funny March 1st come from? March 1st results from adding 31 days (number of days in January) to January 30th.

Billing month example 3

  • Billing cycle as calendar month is unchecked

  • billing cycles start in January 2024 (leap year)

Billing cycles:

  • January 30th 2024 00:00:00 - February 29th 2024 23:59:59.99

  • March 1st 2024 00:00:00 - March 31st 2023 23:59:59.99

  • following cycles will all start on the 1st of the month

Yearly cycles

When a yearly cycle anniversary cycle is NOT on on February 29th, all cycles will start on the same date.

E.g., assuming we have a 3 years billing cycle that starts on June 10th, 2023. The cycles will be:

  • June 10th 2023 00:00:00 - June 9th, 2024, 23:59:59.99

  • June 10th 2024 00:00:00 - June 9th, 2025, 23:59:59.99

  • June 10th 2025 00:00:00 - June 9th, 2026, 23:59:59.99

  • and so on

If the yearly cycle anniversary date is on February 29th, it will continue to be on that date, as long as it is a valid date. E.g., a 4 years cycle that is always on a leap year: Feb 29th 2024, Feb 29 2028 etc.

If February 29th is an invalid date in a year, the anniversary date will move to next day, March 1st. Here’s a one year cycle example:

  • February 29th 2024 - February 28th, 2025 23:59:59.99

  • March 1st, 2025 00:00:00 - February 28th, 2026, 23:59:59.99

  • March 1st, 2026 00:00:00 - February 28th, 2027, 23:59:59.99

  • March 1st, 2027 00:00:00 - February 29th, 2028, 23:59:59.99

  • March 1st, 2028 00:00:00 - February 28th, 2029, 23:59:59.99