time-1.4: A time library

Safe HaskellSafe-Infered

Data.Time.LocalTime.TimeOfDay

Contents

Synopsis

Time of day

data TimeOfDay Source

Time of day as represented in hour, minute and second (with picoseconds), typically used to express local time of day.

Constructors

TimeOfDay 

Fields

todHour :: Int

range 0 - 23

todMin :: Int

range 0 - 59

todSec :: Pico

Note that 0 <= todSec < 61, accomodating leap seconds. Any local minute may have a leap second, since leap seconds happen in all zones simultaneously

midday :: TimeOfDaySource

Hour twelve

utcToLocalTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)Source

Convert a ToD in UTC to a ToD in some timezone, together with a day adjustment.

localToUTCTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)Source

Convert a ToD in some timezone to a ToD in UTC, together with a day adjustment.

timeToTimeOfDay :: DiffTime -> TimeOfDaySource

Get a TimeOfDay given a time since midnight. Time more than 24h will be converted to leap-seconds.

timeOfDayToTime :: TimeOfDay -> DiffTimeSource

Find out how much time since midnight a given TimeOfDay is.

dayFractionToTimeOfDay :: Rational -> TimeOfDaySource

Get a TimeOfDay given the fraction of a day since midnight.

timeOfDayToDayFraction :: TimeOfDay -> RationalSource

Get the fraction of a day since midnight given a TimeOfDay.