Time
- Last Updated: March 24, 2022
- 1 minute read
- Corticon
- Version 6.3
- Documentation
Corticon's Time attribute operators are as follows:
| Name and Syntax | Returns | Description | |
|---|---|---|---|
| Equals (used as a comparison) | |||
<Time1> =
<Time2> |
Boolean | Returns a value of true if <Time1> is the same as <Time2>, including both the Date and the
Time portions |
|
| Equals (used as an assignment) | |||
<Time1> =
<Time2> |
DateTime | Assigns the value of <Time2> to <Time1> |
|
| Not Equal To | |||
<Time1>
<> <Time2> |
Boolean | Returns a value of true if <Time1> does not equal <Time2> |
|
| Less than | |||
<Time1> <
<Time2> |
Boolean | Returns a value of true if <Time1> is less than <Time2> |
|
| Greater than | |||
<Time1> >
<Time2> |
Boolean | Returns a value of true if <Time1> is greater than <Time2> |
|
| Less than or Equal to | |||
<Time1> <=
<Time2> |
Boolean | Returns a value of true if <Time1> is less than or equal to
<Time2> |
|
| Greater than or Equal to | |||
<Time1> >=
<Time2> |
Boolean | Returns a value of true if <Time1> is greater than or equal to
<Time2> |
|
| In (Range) | |||
attributeReference
in [ |(rangeExpression)|]
|
Boolean | Returns a value of true if attributeReference is in the range of Time values from..to, and
where opening and closing parentheses (
)indicate exclusion of that limit and square brackets
[ ] indicate inclusion of that
limit. |
|
| In (List) | |||
attributeReference
in {listExpression} |
Boolean | Returns a value of true if attributeReference is in the comma-delimited list of
literal values, defined enumeration values, or - if in use - enumeration
labels. |
|
| Hour | |||
<Time>.hour |
Integer | Returns the hour portion of <Time>. The returned value is based on a
24-hour clock. |
|
| Minute | |||
<Time>.min |
Integer | Returns the minute portion of <Time> as an Integer between 0 and 59
|
|
| Second | |||
<Time>.sec |
Integer | Returns the seconds portion of <Time> as an Integer between 0 and 59
|
|
| Add hours | |||
<Time>.addHours (<Integer>) |
Date | Adds the number of hours in <Integer> to the number of hours in the
Time portion of <Time> |
|
| Add minutes | |||
<Time>.addMinutes (<Integer>) |
Date | Adds the number of minutes in <Integer> to the number of minutes in
the Time portion of <Time>
|
|
| Add seconds | |||
<Time>.addSeconds (<Integer>) |
Date | Adds the number of seconds in <Integer> to the number of seconds in
the Time portion of <Time>
|
|
| Hours between | |||
<Time1>.hoursBetween (<Time2>) |
Integer | Returns the Integer number of hours between
<Time1> and <Time2>. If the two times differ by less
than a full hour, the value is zero. This function returns a positive
number if <Time2> is later than
<Time1>. |
|
| Minutes between | |||
<Time1>.minsBetween (<Time2>) |
Integer | Returns the Integer number of minutes between
<Time1> and <Time2>. This
function returns a positive number if <Time2> is later than <Time1>. |
|
| Seconds between | |||
<Time1>.secsBetween (<Time2>) |
Integer | Returns the Integer number of seconds between
<Time1> and <Time2>. This function returns a
positive number if <Time2> is
later than <Time1>. |
|
| To String | |||
<Time>.toString |
String | Converts <Time> to a String with date and time information |
|
| To DateTime | |||
<Time>.toDateTime |
DateTime | Returns a DateTime where the time portion is equal
to the value of <Time> and the
date portion is equal to the epoch. |
|
| getMilliseconds | |||
<Time>.getMilliseconds |
Integer | Returns the internal date/time, namely the number of milliseconds that have transpired since the epoch 1/1/1970 00:00:00 GMT. | |
| getTimeName | |||
<Time>.getTimeName |
String | Returns a String that states whether the time is morning, afternoon, or evening. | |