ddate-0.1.0.0: Discordian Date Types for Haskell

Safe HaskellNone
LanguageHaskell2010

Data.DDate

Synopsis

Documentation

data DDateTime Source #

The DDateTime data type. It consists of a Yold, a Season, a Day |and three integers that signify the time of day.

data DDate Source #

The DDateTime data type. It consists of a Yold, a Season and a Day.

Instances

type Yold = Int Source #

The Yold type. It's just an Int.

data Season Source #

The Season data type. It's just a wrapped Int.

data Day Source #

The Day type. It's just a wrapped Int.

Instances

Eq Day Source # 

Methods

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

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

Ord Day Source # 

Methods

compare :: Day -> Day -> Ordering #

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

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

(>) :: Day -> Day -> Bool #

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

max :: Day -> Day -> Day #

min :: Day -> Day -> Day #

Show Day Source # 

Methods

showsPrec :: Int -> Day -> ShowS #

show :: Day -> String #

showList :: [Day] -> ShowS #

weekdays :: [String] Source #

A function returning the names of the days of the week.

seasons :: [String] Source #

A function returning the names of the seasons.

fluxes :: [String] Source #

A function returning the names of the fluxes.

holydays :: [String] Source #

A function returning the names of the holydays.

yold :: Int -> Yold Source #

Converts an Int to a YOLD (takes a regular year).

convertSeason :: Int -> Season Source #

Converts an Int to a Season (takes the day of the year).

convertDay :: Int -> Day Source #

Converts an Int to a Day (takes the day of the year).

holyday :: DDatable -> String Source #

Takes a DDate or DDateTime instance and returns | the appropriate Holyday (or an empty string).

convertDateTime :: DateTime -> DDateTime Source #

Upgrades a DateTime to a DDateTime.

convertDate :: DateTime -> DDate Source #

Upgrades a DateTime to a DDate.

ddateToDDateTime :: DDate -> DDateTime Source #

Converts a DDate instance to a DDateTime instance | with the time set to midnight.

ddateTimeToDDate :: DDateTime -> DDate Source #

Converts a DDateTime instance to a DDate instance.