Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
timere.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
include Time_ast include Time include Infix type timestamp = Timedesc.timestamp type 'a range = 'a Range.range module Points = Points type points = Points.t let resolve = Resolver.resolve exception Resolution_error of string let resolve_exn ?search_using_tz time = match resolve ?search_using_tz time with | Ok s -> s | Error msg -> raise (Resolution_error msg) let to_sexp = To_sexp.to_sexp let to_sexp_string = To_sexp.to_sexp_string let of_sexp = Of_sexp.(wrap_of_sexp of_sexp) let of_sexp_string = Of_sexp.of_sexp_string let pp_sexp = Printers.pp_sexp module Utils = struct let flatten_month_ranges (months : int range Seq.t) : int Seq.t option = try Some (Month_ranges.Flatten.flatten months) with Range.Range_is_invalid -> None let flatten_month_range_list (months : int range list) : int list option = try Some (Month_ranges.Flatten.flatten_list months) with Range.Range_is_invalid -> None let flatten_month_day_ranges (month_days : int range Seq.t) : int Seq.t option = try Some (Month_day_ranges.Flatten.flatten month_days) with Range.Range_is_invalid -> None let flatten_month_day_range_list (month_days : int range list) : int list option = try Some (Month_day_ranges.Flatten.flatten_list month_days) with Range.Range_is_invalid -> None let flatten_weekday_ranges (weekdays : Timedesc.weekday range Seq.t) : Timedesc.weekday Seq.t option = try Some (Weekday_ranges.Flatten.flatten weekdays) with Range.Range_is_invalid -> None let flatten_weekday_range_list (weekdays : Timedesc.weekday range list) : Timedesc.weekday list option = try Some (Weekday_ranges.Flatten.flatten_list weekdays) with Range.Range_is_invalid -> None end