Date

A literal Date constant value, of type curam.util.type.Date.

The Date 's value is specified in the form yyyy-mm-dd.

Note: There is intentionally no function in CER to obtain the current date - such a function would be volatile in that today it returns one value, tomorrow a different value.

Volatile functions are forbidden in CER, as if a function's result can change, it could mean that previously-performed calculations would now be "wrong".

<?xml version="1.0" encoding="UTF-8"?>
<RuleSet name="Example_Date"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation=
"http://www.curamsoftware.com/CreoleRulesSchema.xsd">
  <Class name="DateExampleRuleClass">

    <Attribute name="nullDate">
      <type>
        <javaclass name="curam.util.type.Date"/>
      </type>
      <derivation>
        <!-- A null Date -->
        <null/>
      </derivation>
    </Attribute>

    <Attribute name="dateOfBirth">
      <type>
        <javaclass name="curam.util.type.Date"/>
      </type>
      <derivation>
        <!-- The Date 3rd October, 1970 -->
        <Date value="1970-10-03"/>
      </derivation>
    </Attribute>

  </Class>

</RuleSet>