File: Time.hs

package info (click to toggle)
ghc 9.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 177,780 kB
  • sloc: haskell: 494,441; ansic: 70,262; javascript: 9,423; sh: 8,537; python: 2,646; asm: 1,725; makefile: 1,333; xml: 196; cpp: 167; perl: 143; ruby: 84; lisp: 7
file content (42 lines) | stat: -rw-r--r-- 1,304 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{-|

= Quick Start

Use these types for time regardless of location (not caring about leap-seconds):

* 'UTCTime' for actual times
* 'NominalDiffTime' for differences between times, i.e. durations

Use these types for the ways people refer to time and time differences:

* 'Day' for something like June 27th 2017
* 'DayOfWeek' for something like Tuesday
* 'TimeOfDay' for something like 5pm
* 'LocalTime' for a 'Day' with a 'TimeOfDay'
* 'TimeZone' for a time zone offset (not actually the time zone itself) like -0700
* 'ZonedTime' for a 'LocalTime' with a 'TimeZone'
* 'CalendarDiffDays' for something like 6 years, 1 month and 5 days
* 'CalendarDiffTime' for something like 6 years, 1 month, 5 days, 3 hours, 7 minutes and 25.784 seconds

Use this for low-latency timing:

* 'Data.Time.Clock.System.SystemTime'

These are less commonly needed:

* 'Data.Time.Clock.TAI.AbsoluteTime' and 'DiffTime' if you do care about leap-seconds.
* 'Data.Time.Clock.TAI.LeapSecondMap' for tracking the leap-seconds
* 'UniversalTime' for time based on Earth rotation
-}
module Data.Time
(
    module Data.Time.Calendar,
    module Data.Time.Clock,
    module Data.Time.LocalTime,
    module Data.Time.Format
) where

import Data.Time.Calendar
import Data.Time.Clock
import Data.Time.LocalTime
import Data.Time.Format