The DateShift object is used to define a way to change the current date.
It is defined as an extensible enum, and it implements IDateShift that is used to handle the enum values.
Value
Meaning
PREVIOUS_DATE
Get the previous date of the targeted store.
NEXT_DATE
Get the next date of the targeted store.
CURRENT_DATE
The actual date.
ALL_DATE
All available dates (handled specifically)
The IDateShift interface
fromString/toString: toString should implement getClass().getCanonicalName() + "#" + name() and then the fromString can retrieve the right instance.
IDateShift also implements IStepDate, that will give the functional interface to perform the date shift.
MarketDataDates
This class provides the implementations under the enumeration values.
allKnownDates: Returns all the dates available in a store`, ordered with the LocalDate comparator.
getPreviousAsOfDateInDimension: Returns the previous date of the store, if it exists.
getNextAsOfDateInDimension: Returns the next date of the store, if it exists.
stepDate: Calls the date shift of the provided enum parameter.