2011/6/30 <span dir="ltr"><<a href="mailto:rouvas@mm.di.uoa.gr">rouvas@mm.di.uoa.gr</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What are the available symbolics for temporal values?<br>
That is, d is for days, m is for minutes, h is for hours, s is for seconds.<br>
Are there any other symbolics specifically for months and years?<br></blockquote><div><br>You can use ms for millisecond. There are no universally acceptable duration values for monts and years .<br>-W<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I haven't found any mentioning of them in the Fusion manual.<br>
I'm using 5.0.1<br>
<br>
Thank you,<br>
-Stathis<br>
<br>
Wolfgang Laun wrote:<br>
> See the "Fusion" manual, section on Temporal Reasoning/Temporal Operators.<br>
> Even when the facts aren't events, these operators can still be applied to<br>
> fields of type Date, e.g.<br>
><br>
> $p1: Person( $dob1: dob )<br>
> $p2: Person( $dob2: dob after[3d] $dob1 )<br>
><br>
> -W<br>
><br>
><br>
> On 28 June 2011 18:02, <<a href="mailto:rouvas@mm.di.uoa.gr">rouvas@mm.di.uoa.gr</a>> wrote:<br>
><br>
>> Hi list,<br>
>><br>
>> I feel this should be an elementary question but unfortunately I haven't<br>
>> been able to find a solution.<br>
>><br>
>> I would like to perform date arithmetic in the when part of a rule.<br>
>><br>
>> For example, I would like to express something like:<br>
>><br>
>> rule "Date compare rule"<br>
>> dialect "mvel"<br>
>> when<br>
>> a : A()<br>
>> b : B( a.creationDate <= b.creationDate after 3 months)<br>
>> then<br>
>> ...<br>
>> end<br>
>><br>
>> Apart from using eval()'s is there any other way to express these types<br>
>> of<br>
>> comparisons?<br>
>><br>
>> Thank you for your time,<br>
>> -Stathis<br>
>><br>
>><br>
>> _______________________________________________<br>
>> rules-users mailing list<br>
>> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>><br>
><br>
<br>
<br>
</blockquote></div><br>