7a28e39643e19d34b5beaec29a5d008c9cdd262c
[packages/time.git] / lib / Data / Time / Clock / Internal / UniversalTime.hs
1 module Data.Time.Clock.Internal.UniversalTime
2 (
3 -- * Universal Time
4 -- | Time as measured by the Earth.
5 UniversalTime(..),
6 ) where
7
8 import Data.Typeable
9 import Data.Data
10 import Control.DeepSeq
11
12
13 -- | The Modified Julian Date is the day with the fraction of the day, measured from UT midnight.
14 -- It's used to represent UT1, which is time as measured by the earth's rotation, adjusted for various wobbles.
15 newtype UniversalTime = ModJulianDate {getModJulianDate :: Rational} deriving (Eq,Ord,Data, Typeable)
16
17 -- necessary because H98 doesn't have "cunning newtype" derivation
18 instance NFData UniversalTime where
19 rnf (ModJulianDate a) = rnf a