durationCompby Group Public on Monday June 22 2009 @ 15:05:42 (1/1 Points) |
|
| API ↪Reference ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It |
durationComp can be used to check the duration→, or elapsed time, between two events, or some event and now. This is useful if you need to ask questions like did it happen 24 hours later?
Syntax
The function is exposed simply with the syntax durationComp DURATIONA OP DURATIONB. This is typically used as part of an if→ or Checkpoint→ statement.
The two durations→ can either be specified directly or be the result of another dateTimeBinOp→ calculation.
OP is one of the operators listed below.
Operator
The standard strict equality operators available are <, >,=,<= and >=.
Strict equality comparisons require that the condition always be met to be true. Consider the expression durationComp P1M >= P30D. In February this expression is false, therefore the entire expression is false.
A counterpart are the indeterminate comparators ~=, ~<= and ~>=. These will return true even in those cases where it may sometimes be false. For example durationComp P1M ~= P31D will be true, rather than false with a strict equality.
TestPlan durationComp
