Module Betacalendars.Date_range

type t

Inclusive finite date interval.

val make : start:Civil_date.t -> stop:Civil_date.t -> (t, [ `Reversed ]) Stdlib.result

Build an inclusive range; reject an end before the start.

val start : t -> Civil_date.t

Inclusive first date.

val stop : t -> Civil_date.t

Inclusive last date.

val length : t -> int

Number of dates in the inclusive interval.

val iter : t -> f:(Civil_date.t -> unit) -> unit

Visit each date in ascending order using constant auxiliary memory.

val fold : t -> init:'a -> f:('a -> Civil_date.t -> 'a) -> 'a

Fold over dates in ascending order using constant auxiliary memory.

val to_list : t -> Civil_date.t list

Materialize all dates; use iter or fold for large ranges.