Fix date calculation bug in RuleDate