create_exn ~y ~m ~d
creates the date specified in the arguments. Arguments are
validated, and are not normalized in any way. So, days must be within the limits for
the month in question, numbers cannot be negative, years must be fully specified, etc.
add_weekdays t 0
returns the next weekday if t
is a weekend and t
otherwise.
Unlike add_days this is done by looping over the count of days to be added (forward or
backwards based on the sign), and is O(n) in the number of days to add.
Beware, add_weekdays sat 1
or add_weekdays sun 1
both return the next tue
,
not the next mon
. You may want to use following_weekday
if you want the next
following weekday, following_weekday (fri|sat|sun)
would all return the next mon
.