Reference > Rule Languages > Business Action Language > BAL Operators > Date Operators

Date operators perform tests on dates (java.util.Date).

Table 3 Date operators
Operator 
Description 
Example 
<date> is after <date> 
Tests that a date comes after another date. 
if 
   the return date of 'rented car' is after 05/07/2007 05:00:00 PM 
then... 
<date> is after <date> and on or before <date> 
Tests that a date is in a range in which the first date is excluded, and the last date is included. 
if 
   the return date of 'rented car' is after 'pickup date' and on or before 'scheduled return date' 
then... 
<date> is after <date> and before <date> 
Tests that a date is in a range in which both dates are excluded. 
if 
   the return date of 'rented car' is after 'pickup date' and before 'scheduled return date' 
then... 
<date> is after or the same as <date> 
Tests that a date comes after another date, or is the same as that other date. 
if 
the return date of 'rented car'  
is after or the same as 05/07/2007 05:00:00 PM 
then... 
<date> is at <time> 
Tests that the time part of a date is at the specified time. 
if 
the return date of 'rented car' is at 05:00:00 PM 
then... 
<date> is before <date> 
Tests that a date comes before another date. 
if 
the return date of 'rented car' is before 05/07/2007 05:00:00 PM 
then... 
<date> is before or the same as <date> 
Tests that a date comes before another date, or is the same as that other date. 
if 
the return date of 'rented car'  
is before or the same as 05/07/2007 05:00:00 PM 
then... 
<date> is in <month> 
Tests that a date is in a specific month. 
if 
the return date of 'rented car' is in October 
then... 
<date> is in <month> <year> 
Tests that a date is in the specified month of the specified year. 
if 
the return date of 'rented car' is in October 2007 
then... 
<date> is in year <year> 
Tests that a date is in the specified year. 
if 
the return date of 'rented car' is in year 2007 
then... 
<date> is on <day of week> 
Tests that a date is on a specific day of the week. 
if 
the return date of 'rented car' is on Thursday 
then... 
<date> is on <simple date> 
Tests that a date is on a specific date, specified without a time. 
if 
the return date of 'rented car' is on 05/07/2007 
then... 
<date> is on <day of week> at <time> 
Tests that a date is on a specific day of the week, at a specific time. 
if 
the return date of 'rented car' is on Thursday at 05:00:00 PM 
then... 
<date> is on or after <date> and before <date> 
Tests that a date is in a range in which the first date is included, and the last date is excluded. 
if 
the return date of 'rented car'  
is on or after 'pickup date' and before 'scheduled return date' 
then... 
<date> is on or after <date> and on or before <date> 
Tests that a date is in a range in which both dates are included. 
if 
the return date of 'rented car'  
is on or after 'pickup date' and on or before 'scheduled return date' 
then... 

Related Concepts

Business Rules
Decision Tables
Decision Trees

Related Tasks

Creating Business Rules
Working With Decision Tables
Working With Decision Trees

Related Reference

BAL Operators
Number Operators
Object Operators
Text Operators

Related Samples and Tutorials

Tutorial: Creating Business Rules