Package org.drip.analytics.eventday
Class Locale
java.lang.Object
org.drip.analytics.eventday.Locale
public class Locale
extends java.lang.Object
Locale contains the set of regular holidays and the weekend holidays for a location. It also
provides the functionality to add custom holidays and weekends.
- 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
-
Constructor Summary
Constructors Constructor Description Locale()Construct an empty LocHolidays instance -
Method Summary
Modifier and Type Method Description booleanaddFixedHoliday(int iDay, int iMonth, java.lang.String strDescription)Add a fixed holiday from the day and monthbooleanaddFloatingHoliday(int iWeekInMonth, int iWeekDay, int iMonth, boolean bFromFront, java.lang.String strDescription)Add a floating holiday from the week in month, the day in week, the month, and whether holidays are calculated from front/back.booleanaddStandardWeekend()Add the regular SATURDAY/SUNDAY weekendbooleanaddStaticHoliday(java.lang.String strDate, java.lang.String strDescription)Add the given string date as a static holidaybooleanaddStaticHoliday(JulianDate dt, java.lang.String strDescription)Add the given date as a static holidaybooleanaddWeekend(int[] aiDays)Add the array of weekend daysjava.util.Set<Base>holidays()Return the set of week day holidaysWeekendweekendDays()Return the weekendMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Locale
public Locale()Construct an empty LocHolidays instance
-
-
Method Details
-
addWeekend
public boolean addWeekend(int[] aiDays)Add the array of weekend days- Parameters:
aiDays- Array of weekend days- Returns:
- Succeeded (true), failure (false)
-
addStandardWeekend
public boolean addStandardWeekend()Add the regular SATURDAY/SUNDAY weekend- Returns:
- Succeeded (true), failure (false)
-
addStaticHoliday
Add the given date as a static holiday- Parameters:
dt- DatestrDescription- Description- Returns:
- Succeeded (true), failure (false)
-
addStaticHoliday
public boolean addStaticHoliday(java.lang.String strDate, java.lang.String strDescription)Add the given string date as a static holiday- Parameters:
strDate- Date stringstrDescription- Description- Returns:
- Succeeded (true), failure (false)
-
addFixedHoliday
public boolean addFixedHoliday(int iDay, int iMonth, java.lang.String strDescription)Add a fixed holiday from the day and month- Parameters:
iDay- DayiMonth- MonthstrDescription- Description- Returns:
- Succeeded (true), failure (false)
-
addFloatingHoliday
public boolean addFloatingHoliday(int iWeekInMonth, int iWeekDay, int iMonth, boolean bFromFront, java.lang.String strDescription)Add a floating holiday from the week in month, the day in week, the month, and whether holidays are calculated from front/back.- Parameters:
iWeekInMonth- Week in the MonthiWeekDay- Day in the weekiMonth- MonthbFromFront- Holidays are calculated from the start of the month (True)strDescription- Description- Returns:
- Succeeded (true), failure (false)
-
weekendDays
Return the weekend- Returns:
- Weekend
-
holidays
Return the set of week day holidays- Returns:
- Set of hoidays
-