relative to which anchor date?
a holiday rule composed of multiple holiday rules.
a holiday rule composed of multiple holiday rules. this rule will treat a day as holiday if any one of underlying rule returns true
list of holiday rules
always recur by calendar day
always recur by calendar day
use cases like: "d1 to d2 by n working days" can be solved by: val dates = Date(2014, 5, 10) to Date(2014, 10, 10) except Weekends dates.toList.grouped(5).map(_.last).foreach(println)
in days
immutable object to represent a Date.
immutable object to represent a Date. All mutating operations will return a new Date.
column header
dates of the column, starting from top
The DateRange
class represents all date values in range.
The DateRange
class represents all date values in range. Both start and end date included.
This class does not create all Date object to construct a new range. Its complexity is O(1).
For example:
Date(2015, 7, 7) to Date(2015, 7, 10) foreach println
output:
Date(2015,7,7) Date(2015,7,8) Date(2015,7,9) Date(2015,7,10)
the start of this range.
the exclusive end of the range.
pattern used to generate date range
except which holidays
how to shift the date once it's generated? eg, no shift, 2 days later, 2 working days later
How to select the date once the date is generated? eg, same day, following working day?
builder class to manipulate DateRange
builder class to manipulate DateRange
from date
to date
row index, starts from 0
dates of the row, starting from left
This class locates one day in a month
This class locates one day in a month
For each DayOfMonth implementation, Lamma expect there is one and only one day match the criteria
This class locates one day in a year
This class locates one day in a year
For each DayOfYear implementation, Lamma expect there is one and only one day match the criteria in each year
abstract class is used instead of trait
abstract class is used instead of trait
otherwise it's not quite java friendly https://github.com/maxcellent/lamma/issues/4
Locator is used to generate DayOfWeek, DayOfMonth and DayOfYear depends on the context
number of months for each recurring step
works for Weekly, Monthly and Yearly patterns
works for Yearly pattern only
works for Yearly pattern only
ordinal of the month
works for Monthly and Yearly patterns
recurrence pattern
period start date inclusive
period end date inclusive
build period based on schedule start / end date and period end days
once we shifted, how we are going to select the date to use
how we are going to shift relative to the anchor date
stub rule based period builders
number of weeks for each step
consider all weekend as holiday
Lamma schedule generator is a professional financial schedule generation library.
Some use cases are:
The starting point of the libary is the
com.lamma.Lamma
classhttp://www.lamma.io for samples and tutorials