File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -257,12 +257,14 @@ let of_compact_duration s =
257
257
let seconds_1m = 60
258
258
let seconds_1h = seconds_1m * 60
259
259
let seconds_1d = seconds_1h * 24
260
+ let seconds_1y = seconds_1d * 365
260
261
261
262
let time_x factor = (fun x -> float @@ factor * x), (fun x -> int_of_float x / factor), (fun x -> float (int_of_float x / factor * factor))
262
263
let (seconds,to_seconds,round_seconds) = time_x 1
263
264
let (minutes,to_minutes,round_minutes) = time_x seconds_1m
264
265
let (hours,to_hours,round_hours) = time_x seconds_1h
265
266
let (days,to_days,round_days) = time_x seconds_1d
267
+ let (years,to_years,round_years) = time_x seconds_1y
266
268
267
269
(* * convert integer number of milliseconds to Time.t *)
268
270
let msec x = float x /. 1000.
You can’t perform that action at this time.
0 commit comments