package timere

  1. Overview
  2. Docs
type t = timestamp * timestamp
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
val pp : ?display_using_tz:Time_zone.t -> ?format:string -> unit -> Format.formatter -> t -> unit

Pretty printing for interval.

Default format string:

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

Follows same format string rules as Date_time.to_string, 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