| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Data.Time
Description
Quick Start
Use these types for time regardless of location (not caring about leap-seconds):
- UTCTimefor actual times
- NominalDiffTimefor differences between times, i.e. durations
Use these types for the ways people refer to time and time differences:
- Dayfor something like June 27th 2017
- DayOfWeekfor something like Tuesday
- TimeOfDayfor something like 5pm
- LocalTimefor a- Daywith a- TimeOfDay
- TimeZonefor a time zone offset (not actually the time zone itself) like -0700
- ZonedTimefor a- LocalTimewith a- TimeZone
- CalendarDiffDaysfor something like 6 years, 1 month and 5 days
- CalendarDiffTimefor something like 6 years, 1 month, 5 days, 3 hours, 7 minutes and 25.784 seconds
Use this for low-latency timing:
These are less commonly needed:
- AbsoluteTimeand- DiffTimeif you do care about leap-seconds.
- LeapSecondMapfor tracking the leap-seconds
- UniversalTimefor time based on Earth rotation
Documentation
module Data.Time.Calendar
module Data.Time.Clock
module Data.Time.LocalTime
module Data.Time.Format