package calendar

  1. Overview
  2. Docs

Time interface. A time may be seen as a triple (hour, minute, second).

If minutes and seconds do not belong to [0; 60[, they are coerced into this interval.

@example "30 hours, 60 minutes, 80 seconds" is coerced to "31 hours, 1 minute, 20 seconds".

Each time is interpreted in the current time zone (given by Time_Zone.current ()). So, if you change the time zone (by Time_Zone.change), each time consequently changes. If you want to express a time in another time zone (and do not affect others times), use the convert function.

module type Second = sig ... end

Interface for seconds.

module type S = sig ... end

Common operations for all time representations.