The OpenD Programming Language

daysToDayOfWeek

Returns the number of days from the current day of the week to the given day of the week. If they are the same, then the result is 0.

@safe pure nothrow @nogc
int
daysToDayOfWeek

Parameters

currDoW DayOfWeek

The current day of the week.

dow DayOfWeek

The day of the week to get the number of days to.

Examples

assert(daysToDayOfWeek(DayOfWeek.mon, DayOfWeek.mon) == 0);
assert(daysToDayOfWeek(DayOfWeek.mon, DayOfWeek.sun) == 6);
assert(daysToDayOfWeek(DayOfWeek.mon, DayOfWeek.wed) == 2);

Meta