Moab Viewpoint
Date Deciders

Date Deciders

Whenever the XML allows a date decider (instead of a concrete date), these are the valid options:

  • An absolute date value.
  • A relative date value. The relative date is in relation to the current date when the value is evaluated.
  • A date component (such as <component id="nameOfDatebox" />) inside the parent element.
  • An addition binary operation.

Relative vs. Absolute

To specify a date, these elements can be set in the XML:

  • years
  • months
  • days
  • hours
  • minutes
  • seconds

The children in each of these elements must be an integer decider. Any value not set is assumed to be 0. Values specified above the theoretical maximum are converted (25 hours corresponds to +1 day and 1 hour).

If the relative attribute is set to "true", the date will be determined by adding the elements above to the current date.

Addition

To add a duration to a date, specify a <calculate> element and set the attribute binary-operation value to "add". The <first> element should be a duration value decider. The <second> element should be any date decider.

The example below determines a date that is exactly one month after the user-specified starttime.

<calculate binary-operation="add">
 <first>
  <months>1</months>
 </first>
 <second>
  <component id="starttime" />
 </second>
</calculate>