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.

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/Back
    static int INSTANCE_GENERATOR_RULE_SPECIFIC_DAY_OF_MONTH
    Instance Date Generation Rule - Generate Using the Specific Day of the Month
    static 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 Week
    boolean fromBack()
    Retrieve the Flag indicating whether the Lag is from the Front/Back
    JulianDate instanceDay​(int iYear, int iMonth, java.lang.String strCalendar)
    Generate the Particular Day of the Year, the Month, according to the Calendar
    int instanceGenerator()
    Retrieve the Instance Generation Rule
    int lag()
    Retrieve the Date Lag
    int specificDayInMonth()
    Retrieve the Specific Day in Month
    java.lang.String toString()  
    int weekInMonth()
    Retrieve the Week In Month

    Methods 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_LAG
      Instance 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_DAY
      Instance 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_MONTH
      Instance 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.Exception
      DateInMonth Constructor
      Parameters:
      iInstanceGeneratorRule - Instance Generation Rule
      bFromBack - TRUE - Apply Rules from Back of EOM
      iLag - The Lag
      iDayOfWeek - Day of Week
      iWeekInMonth - Week in the Month
      iSpecificDayInMonth - 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

      public JulianDate instanceDay​(int iYear, int iMonth, java.lang.String strCalendar)
      Generate the Particular Day of the Year, the Month, according to the Calendar
      Parameters:
      iYear - Target Year
      iMonth - Target Month
      strCalendar - Target Calendar
      Returns:
      The Particular Day
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object