mte/src/timestamp.mli

38 lines
768 B
OCaml
Raw Normal View History

(* TODO time
uhuh!
2025-12-11 04:20:09 +01:00
need to be int64 for binary/pg round trip
really need to fix this module *)
type t = Ptime.t option
type span = Ptime.Span.t option
2025-12-11 07:23:51 +01:00
module Span : sig
type t = span
2026-02-03 15:56:05 +01:00
val of_string : string -> (t, string) result
val pp : Stdlib.Format.formatter -> t -> unit
(* - *)
2025-12-11 07:23:51 +01:00
val jsont : t Jsont.t
val bin : t Bin.t
val bin_nbo : t Bin.t
val caqti : t Caqti_type.t
end
val diff : t -> t -> span
val add_span_exn : t -> span -> t
val of_span_exn : span -> t
2025-12-11 04:20:09 +01:00
val compare : t -> t -> int option
2026-02-03 15:56:05 +01:00
(* used for offline tool argument conversion *)
val of_string : string -> (t, string) result
val pp : Stdlib.Format.formatter -> t -> unit
(* - *)
val jsont : t Jsont.t
val bin : t Bin.t
val bin_nbo : t Bin.t
2025-12-11 07:23:51 +01:00
val caqti : t Caqti_type.t