You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Temporal Expressions

The Apache Open For Business recurring events are based on Temporal Expressions - a design proposed by Martin Fowler: Recurring Events for Calendars (pdf). The design is extremely flexible and it allows for arbitrarily complex recurring events.

Overview

Each temporal expression could be considered a rule - like "every Monday" or "the 15th of the month." Temporal expressions can used alone or they can be combined in any of three collection expressions - Union, Intersection, and Difference. A date will match a Union collection if any of its member expressions match (logical OR). A date will match an Intersection collection if all of its member expressions match (logical AND). A date will match a Difference collection if it matches the included member expression and doesn't match the excluded member expression (logical AND NOT).

Some of the basic OFBiz temporal expressions are ranges - which simplifies expression creation. For example, if an event occurs every Monday, Tuesday, and Wednesday, you could create an expression for each day and make them members of a Union expression, or you could use a single Day Of Week Range expression that includes Monday through Wednesday.

Basic Expressions

Expression Collections

The Substitution Expression

  • No labels