File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -42,3 +42,12 @@ let name = function
42
42
" it appears you mixed a pre 1.0 Clock implementation with a post 1.1 \
43
43
Timmy interface"
44
44
| { name; _ } -> name
45
+
46
+ module T = struct
47
+ type nonrec t = t
48
+
49
+ let compare t1 t2 = String. compare (name t1) (name t2)
50
+ let sexp_of_t t = Base.Sexp. Atom (name t)
51
+ end
52
+
53
+ include Base.Comparable. Make (T )
Original file line number Diff line number Diff line change @@ -43,3 +43,10 @@ val gmt_offset_seconds_at_time : t -> Ptime.t -> int
43
43
44
44
(* * [name tz] is the IANA name of [tz], if it could be determined. *)
45
45
val name : t -> string
46
+
47
+ (* * {1 Comparison} *)
48
+
49
+ (* * Timezones are comparable through their names. *)
50
+
51
+ (* * @inline *)
52
+ include Base.Comparable. S with type t := t
You can’t perform that action at this time.
0 commit comments