hasquant
Safe HaskellNone
LanguageHaskell2010

QuantLib.Time.Date

Synopsis

Documentation

data Day #

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

Instances

Instances details
NFData Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

rnf :: Day -> () #

Data Day 
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 #

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

toConstr :: Day -> Constr #

dataTypeOf :: Day -> DataType #

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

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

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

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

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

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

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

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

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

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

Enum Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

succ :: Day -> Day #

pred :: Day -> Day #

toEnum :: Int -> Day #

fromEnum :: Day -> Int #

enumFrom :: Day -> [Day] #

enumFromThen :: Day -> Day -> [Day] #

enumFromTo :: Day -> Day -> [Day] #

enumFromThenTo :: Day -> Day -> Day -> [Day] #

Ix Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

range :: (Day, Day) -> [Day] #

index :: (Day, Day) -> Day -> Int #

unsafeIndex :: (Day, Day) -> Day -> Int #

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

rangeSize :: (Day, Day) -> Int #

unsafeRangeSize :: (Day, Day) -> Int #

Read Day 
Instance details

Defined in Data.Time.Format.Parse

Show Day 
Instance details

Defined in Data.Time.Calendar.Gregorian

Methods

showsPrec :: Int -> Day -> ShowS #

show :: Day -> String #

showList :: [Day] -> ShowS #

Eq Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

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

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

Ord Day 
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 
Instance details

Defined in Data.Time.Calendar.Days

FormatTime Day 
Instance details

Defined in Data.Time.Format.Format.Instances

ISO8601 Day

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

Instance details

Defined in Data.Time.Format.ISO8601

ParseTime Day 
Instance details

Defined in Data.Time.Format.Parse.Instances

minDate :: Day #

earliest allowed date in QuantLib

maxDate :: Day #

latest date allowed in QuantLib

year :: Day -> Int #

data Month #

returns TRUE if the given date's year is leap

Instances

Instances details
Bounded Month # 
Instance details

Defined in QuantLib.Time.Date

Enum Month # 
Instance details

Defined in QuantLib.Time.Date

Show Month # 
Instance details

Defined in QuantLib.Time.Date

Methods

showsPrec :: Int -> Month -> ShowS #

show :: Month -> String #

showList :: [Month] -> ShowS #

Eq Month # 
Instance details

Defined in QuantLib.Time.Date

Methods

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

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

Ord Month # 
Instance details

Defined in QuantLib.Time.Date

Methods

compare :: Month -> Month -> Ordering #

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

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

(>) :: Month -> Month -> Bool #

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

max :: Month -> Month -> Month #

min :: Month -> Month -> Month #

data Weekday #

Instances

Instances details
Bounded Weekday # 
Instance details

Defined in QuantLib.Time.Date

Enum Weekday # 
Instance details

Defined in QuantLib.Time.Date

Show Weekday # 
Instance details

Defined in QuantLib.Time.Date

Eq Weekday # 
Instance details

Defined in QuantLib.Time.Date

Methods

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

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

Ord Weekday # 
Instance details

Defined in QuantLib.Time.Date

data ImmMonth #

Constructors

F 
G 
H 
J 
K 
M 
N 
Q 
U 
V 
X 
Z 

Instances

Instances details
Bounded ImmMonth # 
Instance details

Defined in QuantLib.Time.Date

Enum ImmMonth # 
Instance details

Defined in QuantLib.Time.Date

Show ImmMonth # 
Instance details

Defined in QuantLib.Time.Date

Eq ImmMonth # 
Instance details

Defined in QuantLib.Time.Date

Ord ImmMonth # 
Instance details

Defined in QuantLib.Time.Date

january :: Int -> Int -> Day #

helper function that is convenient for use as an infix operator

february :: Int -> Int -> Day #

march :: Int -> Int -> Day #

april :: Int -> Int -> Day #

may :: Int -> Int -> Day #

june :: Int -> Int -> Day #

july :: Int -> Int -> Day #

august :: Int -> Int -> Day #

september :: Int -> Int -> Day #

october :: Int -> Int -> Day #

november :: Int -> Int -> Day #

december :: Int -> Int -> Day #

dayOfYear :: Day -> IO Int #

One-based (Jan 1st = 1)

last day of the month to which the given date belongs

endOfMonth :: Day -> IO Day #

whether a date is the last day of its month

isEndOfMonth :: Day -> IO Bool #

next given weekday following or equal to the given date E.g., the Friday following Tuesday, January 15th, 2002 was January 18th, 2002.see http://www.cpearson.com/excel/DateTimeWS.htm

nextWeekday :: Day -> Weekday -> IO Day #

n-th given weekday in the given month and year E.g., the 4th Thursday of March, 1998 was March 26th, 1998.see http://www.cpearson.com/excel/DateTimeWS.htm

nthWeekday :: Word -> Weekday -> Month -> Int -> IO Day #

returns the IMM code for the given date (e.g. H3 for March 20th, 2013). Warning It raises an exception if the input date is not an IMM date

immCode :: Day -> IO String #

returns the IMM date for the given IMM code (e.g. March 20th, 2013 for H3). Warning It raises an exception if the input string is not an IMM code

immDate :: String -> Day -> IO Day #

returns whether or not the given string is an IMM code

isIMMCode #

Arguments

:: String

immCode

-> Bool

mainCycle

-> Bool 

isIMMDate #

Arguments

:: Day 
-> Bool

mainCycle

-> IO Bool 

returns whether or not the given date is an IMM date

next IMM code following the given code returns the IMM code for next contract listed in the International Money Market section of the Chicago Mercantile Exchange.

nextIMMCode #

Arguments

:: Day 
-> Bool

mainCycle

-> IO String 

next IMM date following the given IMM code returns the 1st delivery date for next contract listed in the International Money Market section of the Chicago Mercantile Exchange.

nextIMMCode' #

Arguments

:: String 
-> Bool

mainCycle

-> Day 
-> IO String 

next IMM code following the given date returns the IMM code for next contract listed in the International Money Market section of the Chicago Mercantile Exchange.

nextIMMDate #

Arguments

:: Day 
-> Bool

mainCycle

-> IO Day 

nextIMMDate' #

Arguments

:: String 
-> Bool

mainCycle

-> Day

referenceDate

-> IO Day 

next IMM date following the given date returns the 1st delivery date for next contract listed in the International Money Market section of the Chicago Mercantile Exchange.

addECBDate :: Day -> IO () #

returns the ECB code for the given date (e.g. MAR10 for March xxth, 2010).Warning It raises an exception if the input date is not an ECB date

ecbCode :: Day -> IO String #

returns the ECB date for the given ECB code (e.g. March xxth, 2013 for MAR10).WarningIt raises an exception if the input string is not an ECB code

ecbDate' :: String -> Maybe Day -> IO Day #

maintenance period start date in the given month/year

ecbDate :: Month -> Int -> IO Day #

returns whether or not the given string is an ECB code

isECBCode :: String -> IO Bool #

returns whether or not the given date is a maintenance period start date

knownECBDates :: IO [Day] #

next ECB code following the given code

nextECBCode' :: String -> IO String #

next ECB code following the given date

nextECBCode :: Maybe Day -> IO String #

next maintenance period start date following the given ECB code

nextECBDate' :: String -> Maybe Day -> IO Day #

next maintenance period start date following the given date

nextECBDate :: Maybe Day -> IO Day #

next maintenance period start dates following the given code