liblawless-0.26.0: Prelude based on protolude for GHC 8 and beyond.

Safe HaskellNone
LanguageHaskell2010

Time

Synopsis

Documentation

data Time Source #

Instances

Eq Time Source # 

Methods

(==) :: Time -> Time -> Bool #

(/=) :: Time -> Time -> Bool #

Ord Time Source # 

Methods

compare :: Time -> Time -> Ordering #

(<) :: Time -> Time -> Bool #

(<=) :: Time -> Time -> Bool #

(>) :: Time -> Time -> Bool #

(>=) :: Time -> Time -> Bool #

max :: Time -> Time -> Time #

min :: Time -> Time -> Time #

Show Time Source # 

Methods

showsPrec :: Int -> Time -> ShowS #

show :: Time -> String #

showList :: [Time] -> ShowS #

Generic Time Source # 

Associated Types

type Rep Time :: * -> * #

Methods

from :: Time -> Rep Time x #

to :: Rep Time x -> Time #

ToJSON Time Source # 
FromJSON Time Source # 

Methods

parseJSON :: Value -> Parser Time #

Binary Time Source # 

Methods

put :: Time -> Put #

get :: Get Time #

putList :: [Time] -> Put #

Printable Time Source # 

Methods

print :: Printer p => Time -> p #

Textual Time Source # 

Methods

textual :: (Monad μ, CharParsing μ) => μ Time #

FormatTime Time Source # 
ParseTime Time Source # 

Methods

buildTime :: TimeLocale -> [(Char, String)] -> Maybe Time #

type Rep Time Source # 
type Rep Time = D1 * (MetaData "Time" "Time" "liblawless-0.26.0-FvAjUlvgS5MCQ2J8lcpoez" True) (C1 * (MetaCons "Time" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * UTCTime)))

data Seconds Source #

Instances

Enum Seconds Source # 
Eq Seconds Source # 

Methods

(==) :: Seconds -> Seconds -> Bool #

(/=) :: Seconds -> Seconds -> Bool #

Fractional Seconds Source # 
Data Seconds Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Seconds -> c Seconds #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Seconds #

toConstr :: Seconds -> Constr #

dataTypeOf :: Seconds -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Seconds) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Seconds) #

gmapT :: (forall b. Data b => b -> b) -> Seconds -> Seconds #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seconds -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seconds -> r #

gmapQ :: (forall d. Data d => d -> u) -> Seconds -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Seconds -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seconds -> m Seconds #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seconds -> m Seconds #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seconds -> m Seconds #

Num Seconds Source # 
Ord Seconds Source # 
Real Seconds Source # 
RealFrac Seconds Source # 

Methods

properFraction :: Integral b => Seconds -> (b, Seconds) #

truncate :: Integral b => Seconds -> b #

round :: Integral b => Seconds -> b #

ceiling :: Integral b => Seconds -> b #

floor :: Integral b => Seconds -> b #

Show Seconds Source # 
ToJSON Seconds Source # 
FromJSON Seconds Source # 
Binary Seconds Source # 

Methods

put :: Seconds -> Put #

get :: Get Seconds #

putList :: [Seconds] -> Put #

class ParseTime t where #

The class of types which can be parsed given a UNIX-style time format string.

Minimal complete definition

buildTime

Methods

buildTime #

Arguments

:: TimeLocale

The time locale.

-> [(Char, String)]

Pairs of format characters and the corresponding part of the input.

-> Maybe t 

Builds a time value from a parsed input string. If the input does not include all the information needed to construct a complete value, any missing parts should be taken from 1970-01-01 00:00:00 +0000 (which was a Thursday). In the absence of %C or %Y, century is 1969 - 2068.

day :: Lens' Time Day Source #

Lens for the Day component of a Time.

time :: Lens' Time DiffTime Source #

Lens for the DiffTime component of a Time.

now :: MonadIO m => m Time Source #

Get the current system time.

seconds :: Iso' Double DiffTime Source #

Convert between Double and Seconds.