| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.Time.Date
Synopsis
- data Day
- minDate :: Day
- maxDate :: Day
- today :: IO Day
- isLeap :: Day -> Bool
- year :: Day -> Int
- month :: Day -> Month
- weekday :: Day -> IO Weekday
- data Month
- data Weekday
- data ImmMonth
- january :: Int -> Int -> Day
- 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
- endOfMonth :: Day -> IO Day
- isEndOfMonth :: Day -> IO Bool
- nextWeekday :: Day -> Weekday -> IO Day
- nthWeekday :: Word -> Weekday -> Month -> Int -> IO Day
- immCode :: Day -> IO String
- immDate :: String -> Day -> IO Day
- isIMMCode :: String -> Bool -> Bool
- isIMMDate :: Day -> Bool -> IO Bool
- nextIMMCode :: Day -> Bool -> IO String
- nextIMMCode' :: String -> Bool -> Day -> IO String
- nextIMMDate :: Day -> Bool -> IO Day
- nextIMMDate' :: String -> Bool -> Day -> IO Day
- addPeriod :: Day -> (Int, TimeUnit) -> IO Day
- addECBDate :: Day -> IO ()
- ecbCode :: Day -> IO String
- ecbDate' :: String -> Maybe Day -> IO Day
- ecbDate :: Month -> Int -> IO Day
- isECBCode :: String -> IO Bool
- isECBDate :: Day -> IO Bool
- knownECBDates :: IO [Day]
- nextECBCode' :: String -> IO String
- nextECBCode :: Maybe Day -> IO String
- nextECBDate' :: String -> Maybe Day -> IO Day
- nextECBDate :: Maybe Day -> IO Day
- nextECBDates' :: String -> Maybe Day -> IO [Day]
- nextECBDates :: Maybe Day -> IO [Day]
- removeECBDate :: Day -> IO ()
Documentation
The Modified Julian Day is a standard count of days, with zero being the day 1858-11-17.
Instances
| NFData Day | |
Defined in Data.Time.Calendar.Days | |
| Data Day | |
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 # 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 | |
| Ix Day | |
| Read Day | |
| Show Day | |
| Eq Day | |
| Ord Day | |
| DayPeriod Day | |
Defined in Data.Time.Calendar.Days | |
| FormatTime Day | |
Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> Day -> String) # | |
| ISO8601 Day |
|
Defined in Data.Time.Format.ISO8601 Methods iso8601Format :: Format Day # | |
| ParseTime Day | |
Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: Proxy Day -> TimeLocale -> Char -> Maybe String # parseTimeSpecifier :: Proxy Day -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String # | |
returns TRUE if the given date's year is leap
Constructors
| January | |
| Jan | |
| February | |
| Feb | |
| March | |
| Mar | |
| April | |
| Apr | |
| May | |
| June | |
| Jun | |
| July | |
| Jul | |
| August | |
| Aug | |
| September | |
| Sep | |
| October | |
| Oct | |
| November | |
| Nov | |
| December | |
| Dec |
Instances
| Bounded Weekday # | |
| Enum Weekday # | |
| Show Weekday # | |
| Eq Weekday # | |
| Ord Weekday # | |
Instances
| Bounded ImmMonth # | |
| Enum ImmMonth # | |
Defined in QuantLib.Time.Date | |
| Show ImmMonth # | |
| Eq ImmMonth # | |
| Ord ImmMonth # | |
Defined in QuantLib.Time.Date | |
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
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
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.
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.
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.
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
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
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
removeECBDate :: Day -> IO () #