Package org.drip.analytics.eventday
Class DateInMonth
java.lang.Object
org.drip.analytics.eventday.DateInMonth
public class DateInMonth
extends java.lang.Object
DateInMonth exports Functionality that generates the specific Event Date inside of the specified
Month/Year.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Date, Cash Flow, and Cash Flow Period Measure Generation Utilities
- Package = Fixed, Variable, and Custom Holiday Creation
- Author:
- Lakshmi Krishnamurthy
-
Field Summary
Fields Modifier and Type Field Description static int
INSTANCE_GENERATOR_RULE_EDGE_LAG
Instance Date Generation Rules - Generate from Lag from Front/Backstatic int
INSTANCE_GENERATOR_RULE_SPECIFIC_DAY_OF_MONTH
Instance Date Generation Rule - Generate Using the Specific Day of the Monthstatic int
INSTANCE_GENERATOR_RULE_WEEK_DAY
Instance Date Generation Rule - Generate from Specified Day in Week/Week in Month -
Constructor Summary
Constructors Constructor Description DateInMonth(int iInstanceGeneratorRule, boolean bFromBack, int iLag, int iDayOfWeek, int iWeekInMonth, int iSpecificDayInMonth)
DateInMonth Constructor -
Method Summary
Modifier and Type Method Description int
dayOfWeek()
Retrieve the Day Of Weekboolean
fromBack()
Retrieve the Flag indicating whether the Lag is from the Front/BackJulianDate
instanceDay(int iYear, int iMonth, java.lang.String strCalendar)
Generate the Particular Day of the Year, the Month, according to the Calendarint
instanceGenerator()
Retrieve the Instance Generation Ruleint
lag()
Retrieve the Date Lagint
specificDayInMonth()
Retrieve the Specific Day in Monthjava.lang.String
toString()
int
weekInMonth()
Retrieve the Week In MonthMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
INSTANCE_GENERATOR_RULE_EDGE_LAG
public static final int INSTANCE_GENERATOR_RULE_EDGE_LAGInstance Date Generation Rules - Generate from Lag from Front/Back- See Also:
- Constant Field Values
-
INSTANCE_GENERATOR_RULE_WEEK_DAY
public static final int INSTANCE_GENERATOR_RULE_WEEK_DAYInstance Date Generation Rule - Generate from Specified Day in Week/Week in Month- See Also:
- Constant Field Values
-
INSTANCE_GENERATOR_RULE_SPECIFIC_DAY_OF_MONTH
public static final int INSTANCE_GENERATOR_RULE_SPECIFIC_DAY_OF_MONTHInstance Date Generation Rule - Generate Using the Specific Day of the Month- See Also:
- Constant Field Values
-
-
Constructor Details
-
DateInMonth
public DateInMonth(int iInstanceGeneratorRule, boolean bFromBack, int iLag, int iDayOfWeek, int iWeekInMonth, int iSpecificDayInMonth) throws java.lang.ExceptionDateInMonth Constructor- Parameters:
iInstanceGeneratorRule
- Instance Generation RulebFromBack
- TRUE - Apply Rules from Back of EOMiLag
- The LagiDayOfWeek
- Day of WeekiWeekInMonth
- Week in the MonthiSpecificDayInMonth
- Specific Daye In Month- Throws:
java.lang.Exception
- Thrown if Inputs are Invalid
-
-
Method Details
-
instanceGenerator
public int instanceGenerator()Retrieve the Instance Generation Rule- Returns:
- The Instance Generation Rule
-
fromBack
public boolean fromBack()Retrieve the Flag indicating whether the Lag is from the Front/Back- Returns:
- TRUE - The Lag is from the Back.
-
lag
public int lag()Retrieve the Date Lag- Returns:
- The Date Lag
-
weekInMonth
public int weekInMonth()Retrieve the Week In Month- Returns:
- The Week In Month
-
dayOfWeek
public int dayOfWeek()Retrieve the Day Of Week- Returns:
- The Day Of Week
-
specificDayInMonth
public int specificDayInMonth()Retrieve the Specific Day in Month- Returns:
- The Specific Day in Month
-
instanceDay
Generate the Particular Day of the Year, the Month, according to the Calendar- Parameters:
iYear
- Target YeariMonth
- Target MonthstrCalendar
- Target Calendar- Returns:
- The Particular Day
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-