time-exts-1.0.1: Efficient Timestamps

Safe HaskellNone

Data.Time.Exts.Base

Synopsis

Documentation

class DateTimeMath a b whereSource

Methods

plus :: a -> b -> aSource

Instances

DateTimeMath UnixDateTimePicos Picos 
DateTimeMath UnixDateTimePicos Nanos 
DateTimeMath UnixDateTimePicos Micros 
DateTimeMath UnixDateTimePicos Millis 
DateTimeMath UnixDateTimePicos Second 
DateTimeMath UnixDateTimePicos Minute 
DateTimeMath UnixDateTimePicos Hour 
DateTimeMath UnixDateTimePicos Day 
DateTimeMath UnixDateTimeNanos Nanos 
DateTimeMath UnixDateTimeNanos Micros 
DateTimeMath UnixDateTimeNanos Millis 
DateTimeMath UnixDateTimeNanos Second 
DateTimeMath UnixDateTimeNanos Minute 
DateTimeMath UnixDateTimeNanos Hour 
DateTimeMath UnixDateTimeNanos Day 
DateTimeMath UnixDateTimeMicros Micros 
DateTimeMath UnixDateTimeMicros Millis 
DateTimeMath UnixDateTimeMicros Second 
DateTimeMath UnixDateTimeMicros Minute 
DateTimeMath UnixDateTimeMicros Hour 
DateTimeMath UnixDateTimeMicros Day 
DateTimeMath UnixDateTimeMillis Millis 
DateTimeMath UnixDateTimeMillis Second 
DateTimeMath UnixDateTimeMillis Minute 
DateTimeMath UnixDateTimeMillis Hour 
DateTimeMath UnixDateTimeMillis Day 
DateTimeMath UnixDateTime Second 
DateTimeMath UnixDateTime Minute 
DateTimeMath UnixDateTime Hour 
DateTimeMath UnixDateTime Day 
DateTimeMath UnixDate Day 
DateTimeMath LocalDateTimePicos Picos 
DateTimeMath LocalDateTimePicos Nanos 
DateTimeMath LocalDateTimePicos Micros 
DateTimeMath LocalDateTimePicos Millis 
DateTimeMath LocalDateTimePicos Second 
DateTimeMath LocalDateTimeNanos Nanos 
DateTimeMath LocalDateTimeNanos Micros 
DateTimeMath LocalDateTimeNanos Millis 
DateTimeMath LocalDateTimeNanos Second 
DateTimeMath LocalDateTimeMicros Micros 
DateTimeMath LocalDateTimeMicros Millis 
DateTimeMath LocalDateTimeMicros Second 
DateTimeMath LocalDateTimeMillis Millis 
DateTimeMath LocalDateTimeMillis Second 
DateTimeMath LocalDateTime Second 
DateTimeMath LocalDate Day 

prettyMonth :: Month -> StringSource

Shows the given month as a string.

prettyDay :: Day -> StringSource

Shows the given day of the month as a string.

prettyHour :: Hour -> (Hour, String)Source

Returns the given hour in AM-PM format.

properFracMillis :: Floating a => RealFrac a => a -> (Second, Millis)Source

Decomposes a floating point number into second and millisecond components.

properFracMicros :: Floating a => RealFrac a => a -> (Second, Micros)Source

Decomposes a floating point number into second and microsecond components.

properFracNanos :: Floating a => RealFrac a => a -> (Second, Nanos)Source

Decomposes a floating point number into second and nanosecond components.

properFracPicos :: Floating a => RealFrac a => a -> (Second, Picos)Source

Decomposes a floating point number into second and picosecond components.

epochToDate :: Year -> Month -> Day -> DaySource

Calculates the number of days that have elapsed between Unix epoch and the given date.

epochToYear :: Year -> DaySource

Calculates the number of days that have elapsed between Unix epoch and the given year.

yearToMonth :: Month -> Bool -> DaySource

Calculates the number of days that have elapsed between January 1st and the given month.

dateToTime :: Hour -> Minute -> Second -> SecondSource

Calculates the number of seconds that have elapsed between midnight and the given time.

isLeapYear :: Year -> BoolSource

Checks if the given year is a leap year.