There is a time zone offset != 0 in the toString-ed date.
2011/2/10 Saloojee, Karim <karim.saloojee(a)fnb.co.za>
I am comparing SimpleAccount( dateAccountOpened == "5-Feb-2011")
where dateAccountOpened is "Sat Feb 05 00:00:00 GMT+02:00 2011" (if you
call toString()). The equal comparator fails (==) but the greater than
comparator passes (>) which I don't understand.
I feel I am missing something obvious here, but I have no idea what it
rule "Test date equality"
$acc : SimpleAccount( dateAccountOpened == "5-Feb-2011")
System.out.println("Expected and found an account opened
on 5-Feb-2011: " + $acc);
rule "Some dates are more equal than others"
$acc : SimpleAccount( dateAccountOpened > "5-Feb-2011")
System.out.println("Unexpected match: " +
To read FirstRand Bank's Disclaimer for this email click on the following
address or copy into your Internet browser:
If you are unable to access the Disclaimer, send a blank e-mail to
firstrandbankdisclaimer(a)fnb.co.za and we will send you a copy of the
rules-users mailing list