Blaze rule engine: LocalDate

By , last updated December 16, 2019

Using LocalDate with Blaze rule engine can be not so obvious sometimes, so here’s an example of a rule that calculates a period interval of 5 months:

if(true)
then {
   fromDate is some LocalDate initially LocalDate.newInstance(2010,9,1);
   toDate is some LocalDate;
   toDate = fromDate.plusMonth(5).dayOfMonth().withMaximumValue();
}