Module Timedesc.Interval

type t = timestamp * timestamp

Left-closed, right-open interval, i.e. interval is * of the form [x, y), which includes x and excludes y

Comparison

val equal : t -> t -> bool
val lt : t -> t -> bool
val le : t -> t -> bool
val gt : t -> t -> bool
val ge : t -> t -> bool
val compare : t -> t -> int

Pretty-printing

val pp : ?display_using_tz:Time_zone.t -> ?format:string -> unit -> Stdlib.Format.formatter -> t -> unit

Pretty-printing for interval.

Default format string:

[{syear} {smon:Xxx} {sday:0X} {shour:0X}:{smin:0X}:{ssec:0X}{ssec-frac:.} \
{stzoff-sign}{stzoff-hour:0X}:{stzoff-min:0X}:{stzoff-sec:0X}, {eyear} \
{emon:Xxx} {eday:0X} {ehour:0X}:{emin:0X}:{esec:0X}{esec-frac:.} \
{etzoff-sign}{etzoff-hour:0X}:{etzoff-min:0X}:{etzoff-sec:0X})

Follows same format string rules as pp, but tags are prefixed with 's' for "start time", and 'e' for "end exc time", e.g. for interval (x, y)

  • {syear} gives year of the x
  • {ehour:cX} gives hour of the y
val to_string : ?display_using_tz:Time_zone.t -> ?format:string -> t -> string
val pp_seq : ?display_using_tz:Time_zone.t -> ?format:string -> ?sep:(Stdlib.Format.formatter -> unit -> unit) -> unit -> Stdlib.Format.formatter -> t Stdlib.Seq.t -> unit