BDE 4.14.0 Production release
|
Provide functions for generating schedules of dates.
This component provides a struct
, bblb::ScheduleGenerationUtil
, that serves as a namespace for functions that generate a schedule; a set of dates limited to within a closed-interval date-range, represented by the specified earliest
and latest
dates. Typically, a schedule generation method can be defined by an algorithm specific to the method, an example
date, a closed-interval represented by an earliest
and a latest
date, and any other information required to determine the interval between successive dates in a schedule (for example, the number of days or months between successive dates). The process of computing the dates within a schedule is exemplified using the following diagram:
The schedule generated in the above diagram is [d0, d1, d2, d3, d4]
. Notice that the example
date does not have to reside within the closed interval (the example
date is before the earliest
date in this diagram).
More formally, the resulting schedule
is the subset of the infinite series of dates, defined by all dates separated by an integral multiple of intervals from the example
date, that reside within the closed-interval specified by earliest
and latest
.
The following section provides a synopsis of the main functions provided in this component:
This section illustrates intended use of this component.
Suppose that we want to determine the sequence of dates that are:
[02/01/2012, 02/28/2015]
.First, we define the inputs and output to the schedule generation function:
Now, we invoke the generateFromDayOfMonth
routine to obtain the subset of dates:
Finally, we assert that the generated schedule is what we expect: