The OpenD Programming Language

monthsToMonth

Returns the number of months from the current months of the year to the given month of the year. If they are the same, then the result is 0.

@safe pure
int
monthsToMonth
(,
int month
)

Parameters

currMonth int

The current month of the year.

month int

The month of the year to get the number of months to.

Examples

assert(monthsToMonth(Month.jan, Month.jan) == 0);
assert(monthsToMonth(Month.jan, Month.dec) == 11);
assert(monthsToMonth(Month.jul, Month.oct) == 3);

Meta