For representing a day of the week.
conversion between ints and weekdays uses the same mapping as Unix.tm_wday. 0 <-> Sun, ... 6 <-> Sat
of_int i returns i'th weekday if i is in 0,1,...,6. Otherwise it returns None.
of_int i
i
of_int_exn i should have i in 0,1,...,6 and returns the i'th weekday.
of_int_exn i
to_int t returns an int in 0,1,...6.
to_int t
shift t i goes forward (or backward) the specified number of weekdays
shift t i
num_days ~from ~to_ gives the number of days that must elapse from a from to get to a to_, i.e. the smallest non-negative number i such that shift from i = to_.
num_days ~from ~to_
from
to_
shift from i = to_
is_sun_or_sat returns true if t is Sunday or Saturday
is_sun_or_sat
Sun; Mon; Tue; Wed; Thu; Fri; Sat
Mon; Tue; Wed; Thu; Fri
Sat; Sun