module Lifetime:Datastructure for life timelines.sig..end
Provides a datastructure for representing sets of days as a list of intervals, suitable for
rLepresenting the lifetime of a package in an archive.
exception Empty
typeday =int
type lifetime
val io_lifetime : lifetime Io.literateval io_day : day Io.literateval day_of_ymd : int * int * int -> day(year,month,day) format to a calendar day.val ymd_of_day : day -> int * int * intday_of_date.val empty : lifetimeval load : string -> lifetimeIo.val save : string -> lifetime -> unitIo.val output : Pervasives.out_channel -> lifetime -> unitIo.val singleton : day -> lifetimeval add_day : lifetime -> day -> lifetimeval is_empty : lifetime -> booltrue if the lifetime contains no days.val range : lifetime -> day * dayrange lf returns a pair (a,b) where a is the first day and b
is the last day in the lifetime. Raises Empty if lf is empty.val iterate_over_intervals : (day * day -> unit) -> lifetime -> unit(d,d).val iterate_over_days : (day -> unit) -> lifetime -> unit