[rules-users] Date arithmetic in when part

lhorton LHorton at ABCLegal.com
Thu Jun 30 12:34:47 EDT 2011


Thanks!  I converted over to these and my tests are all passing so far. 
Examples (snippets):

// > one day old
when
	$step : Step(status == Status.ACTIVE, task.job.statuteOfLimitationsDate !=
null)
	Date($now : time) from Calendar.getInstance().getTime()
	Date($solDate : time before[1d] $now) from
$step.task.job.statuteOfLimitationsDate

// > 13 hours old
when
	$step  : Step(status == Status.ACTIVE)
	Date($now : time) from Calendar.getInstance().getTime()
	$checkpointTO : ArrayList(size > 0) from collect (cp : CheckPoint(type ==
CheckPointType.ABCOffice, created before[13h] $now) from
$step.getCheckPoints() )



--
View this message in context: http://drools.46999.n3.nabble.com/rules-users-Date-arithmetic-in-when-part-tp3118246p3126605.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list