Skip to content

Commit

Permalink
Added more of_http aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Feb 9, 2023
1 parent 0f09625 commit db92876
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions timedesc/timedesc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ module Timestamp = struct
let of_rfc9110 = RFC9110_parsers.timestamp_of_str

let of_rfc9110_exn = of_rfc9110_exn' of_rfc9110

let of_http = of_rfc9110

let of_http_exn = of_rfc9110_exn
end

let to_string = Printers.string_of_date_time
Expand Down Expand Up @@ -263,6 +267,10 @@ let of_rfc9110 = RFC9110_parsers.date_time_of_str

let of_rfc9110_exn = of_rfc9110_exn' of_rfc9110

let of_http = of_rfc9110

let of_http_exn = of_rfc9110_exn

let min_of_local_result = min_of_local_result

let max_of_local_result = max_of_local_result
Expand Down
12 changes: 12 additions & 0 deletions timedesc/timedesc.mli
Original file line number Diff line number Diff line change
Expand Up @@ -1522,6 +1522,12 @@ val of_rfc9110 : string -> (t, string) result
val of_rfc9110_exn : string -> t
(** @raise RFC9110_parse_exn if [of_rfc9110] fails *)

val of_http : string -> (t, string) result
(** Alias to [of_rfc9110] *)

val of_http_exn : string -> t
(** Alias to [of_rfc9110_exn] *)

(** {1 Timestamp} *)

module Timestamp : sig
Expand Down Expand Up @@ -1709,6 +1715,12 @@ module Timestamp : sig

val of_rfc9110_exn : string -> t
(** @raise RFC9110_parse_exn if [of_rfc9110] fails *)

val of_http : string -> (t, string) result
(** Alias to [of_rfc9110] *)

val of_http_exn : string -> t
(** Alias to [of_rfc9110_exn] *)
end

(** {1 Interval} *)
Expand Down

0 comments on commit db92876

Please sign in to comment.