time-1.12.1: A time library
Safe HaskellSafe
LanguageHaskell2010

Data.Time.Calendar.OrdinalDate

Description

ISO 8601 Ordinal Date format

Synopsis

Documentation

data Day Source #

The Modified Julian Day is a standard count of days, with zero being the day 1858-11-17.

Instances

Instances details
Data Day Source # 
Instance details

Defined in Data.Time.Calendar.Days

Methods

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

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

toConstr :: Day -> Constr Source #

dataTypeOf :: Day -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Enum Day Source # 
Instance details

Defined in Data.Time.Calendar.Days

Ix Day Source # 
Instance details

Defined in Data.Time.Calendar.Days

Read Day Source # 
Instance details

Defined in Data.Time.Format.Parse

Show Day Source # 
Instance details

Defined in Data.Time.Calendar.Gregorian

NFData Day Source # 
Instance details

Defined in Data.Time.Calendar.Days

Methods

rnf :: Day -> () Source #

Eq Day Source # 
Instance details

Defined in Data.Time.Calendar.Days

Methods

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

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

Ord Day Source # 
Instance details

Defined in Data.Time.Calendar.Days

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 #

DayPeriod Day Source # 
Instance details

Defined in Data.Time.Calendar.Days

FormatTime Day Source # 
Instance details

Defined in Data.Time.Format.Format.Instances

Methods

formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> Day -> String) Source #

ISO8601 Day Source #

yyyy-mm-dd (ISO 8601:2004(E) sec. 4.1.2.2 extended format)

Instance details

Defined in Data.Time.Format.ISO8601

ParseTime Day Source # 
Instance details

Defined in Data.Time.Format.Parse.Instances

type Year = Integer Source #

Year of Common Era (when positive).

type DayOfYear = Int Source #

Day of year, in range 1 (January 1st) to 366. December 31st is 365 in a common year, 366 in a leap year.

type WeekOfYear = Int Source #

Week of year, by various reckonings, generally in range 0-53 depending on reckoning.

pattern YearDay :: Year -> DayOfYear -> Day Source #

Bidirectional abstract constructor for ISO 8601 Ordinal Date format. Invalid day numbers will be clipped to the correct range (1 to 365 or 366).

isLeapYear :: Year -> Bool Source #

Is this year a leap year according to the proleptic Gregorian calendar?

toOrdinalDate :: Day -> (Year, DayOfYear) Source #

Convert to ISO 8601 Ordinal Date format.

fromOrdinalDate :: Year -> DayOfYear -> Day Source #

Convert from ISO 8601 Ordinal Date format. Invalid day numbers will be clipped to the correct range (1 to 365 or 366).

fromOrdinalDateValid :: Year -> DayOfYear -> Maybe Day Source #

Convert from ISO 8601 Ordinal Date format. Invalid day numbers return Nothing

showOrdinalDate :: Day -> String Source #

Show in ISO 8601 Ordinal Date format (yyyy-ddd)

mondayStartWeek :: Day -> (WeekOfYear, Int) Source #

Get the number of the Monday-starting week in the year and the day of the week. The first Monday is the first day of week 1, any earlier days in the year are week 0 (as %W in formatTime). Monday is 1, Sunday is 7 (as %u in formatTime).

sundayStartWeek :: Day -> (WeekOfYear, Int) Source #

Get the number of the Sunday-starting week in the year and the day of the week. The first Sunday is the first day of week 1, any earlier days in the year are week 0 (as %U in formatTime). Sunday is 0, Saturday is 6 (as %w in formatTime).

fromMondayStartWeek Source #

Arguments

:: Year

Year.

-> WeekOfYear

Monday-starting week number (as %W in formatTime).

-> Int

Day of week. Monday is 1, Sunday is 7 (as %u in formatTime).

-> Day 

The inverse of mondayStartWeek. Get a Day given the year, the number of the Monday-starting week, and the day of the week. The first Monday is the first day of week 1, any earlier days in the year are week 0 (as %W in formatTime).

fromMondayStartWeekValid Source #

Arguments

:: Year

Year.

-> WeekOfYear

Monday-starting week number (as %W in formatTime).

-> Int

Day of week. Monday is 1, Sunday is 7 (as %u in formatTime).

-> Maybe Day 

fromSundayStartWeek Source #

Arguments

:: Year

Year.

-> WeekOfYear

Sunday-starting week number (as %U in formatTime).

-> Int

Day of week Sunday is 0, Saturday is 6 (as %w in formatTime).

-> Day 

The inverse of sundayStartWeek. Get a Day given the year and the number of the day of a Sunday-starting week. The first Sunday is the first day of week 1, any earlier days in the year are week 0 (as %U in formatTime).

fromSundayStartWeekValid Source #

Arguments

:: Year

Year.

-> WeekOfYear

Sunday-starting week number (as %U in formatTime).

-> Int

Day of week. Sunday is 0, Saturday is 6 (as %w in formatTime).

-> Maybe Day