net.objectlab.kit.datecalc.joda
Class LocalDateIMMDateCalculator

Package class diagram package LocalDateIMMDateCalculator
java.lang.Object
  extended by net.objectlab.kit.datecalc.common.AbstractIMMDateCalculator<LocalDate>
      extended by net.objectlab.kit.datecalc.joda.LocalDateIMMDateCalculator
All Implemented Interfaces:
IMMDateCalculator<LocalDate>

public class LocalDateIMMDateCalculator
extends AbstractIMMDateCalculator<LocalDate>

Joda LocalDate based implementation of the IMMDateCalculator.

Version:
$Revision: 298 $ $Date: 2010-03-12 19:49:41 -0500 (Fri, 12 Mar 2010) $
Author:
Benoit Xhenseval, $LastChangedBy: benoitx $

Field Summary
protected static int DAYS_IN_WEEK
           
protected static int MONTH_IN_YEAR
           
protected static int MONTHS_IN_QUARTER
           
 
Constructor Summary
LocalDateIMMDateCalculator()
           
 
Method Summary
 List<LocalDate> getIMMDates(LocalDate start, LocalDate end, IMMPeriod period)
          Returns a list of IMM dates between 2 dates, it will exclude the start date if it is an IMM date but would include the end date if it is an IMM.
protected  LocalDate getNextIMMDate(boolean requestNextIMM, LocalDate start, IMMPeriod period)
           
 boolean isIMMDate(LocalDate date)
          Checks if a given date is an official IMM Date (3rd Wednesdays of March/June/Sept/Dec.
 
Methods inherited from class net.objectlab.kit.datecalc.common.AbstractIMMDateCalculator
getIMMDates, getNextIMMDate, getNextIMMDate, getPreviousIMMDate, getPreviousIMMDate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MONTHS_IN_QUARTER

protected static final int MONTHS_IN_QUARTER
See Also:
Constant Field Values

MONTH_IN_YEAR

protected static final int MONTH_IN_YEAR
See Also:
Constant Field Values

DAYS_IN_WEEK

protected static final int DAYS_IN_WEEK
See Also:
Constant Field Values
Constructor Detail

LocalDateIMMDateCalculator

public LocalDateIMMDateCalculator()
Method Detail

getIMMDates

public List<LocalDate> getIMMDates(LocalDate start,
                                   LocalDate end,
                                   IMMPeriod period)
Returns a list of IMM dates between 2 dates, it will exclude the start date if it is an IMM date but would include the end date if it is an IMM.

Parameters:
start - start of the interval, excluded
end - end of the interval, may be included.
period - specify when the "next" IMM is, if quarterly then it is the conventional algorithm.
Returns:
list of IMM dates

getNextIMMDate

protected LocalDate getNextIMMDate(boolean requestNextIMM,
                                   LocalDate start,
                                   IMMPeriod period)
Specified by:
getNextIMMDate in class AbstractIMMDateCalculator<LocalDate>

isIMMDate

public boolean isIMMDate(LocalDate date)
Checks if a given date is an official IMM Date (3rd Wednesdays of March/June/Sept/Dec.

Parameters:
date -
Returns:
true if that date is an IMM date.


Copyright © 2006-2010 Appendium - Portfolio Financing Platform. All Rights Reserved.