2025-11-28 16:57:48 +01:00
|
|
|
(* TODO time
|
2025-12-07 04:05:15 +01:00
|
|
|
uhuh!
|
2025-12-11 04:20:09 +01:00
|
|
|
need to be int64 for binary/pg round trip
|
2026-02-03 14:04:05 +01:00
|
|
|
really need to fix this module
|
|
|
|
|
don't use option for never/forever *)
|
2025-11-28 16:57:48 +01:00
|
|
|
|
|
|
|
|
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 14:04: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
|
|
|
|
|
|
2026-02-03 14:04:05 +01:00
|
|
|
val epoch : t
|
2025-11-28 16:57:48 +01:00
|
|
|
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
|
2025-11-28 16:57:48 +01:00
|
|
|
|
2026-02-03 14:04:05 +01:00
|
|
|
(* used for offline tool argument conversion *)
|
|
|
|
|
val of_string : string -> (t, string) result
|
|
|
|
|
val pp : Stdlib.Format.formatter -> t -> unit
|
|
|
|
|
|
2025-11-28 16:57:48 +01:00
|
|
|
(* - *)
|
|
|
|
|
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
|