Date
- Last Updated: March 24, 2022
- 1 minute read
- Corticon
- Version 6.3
- Documentation
Corticon's Date attribute operators are as follows:
| Name and Syntax | Returns | Description | |
|---|---|---|---|
| Equals (used as a comparison) | |||
<Date1> =
<Date2> |
Boolean | Returns a value of true if <Date1> is the same as <Date2>. |
|
| Equals (used as an assignment) | |||
<Date1> =
<Date2> |
DateTime | Assigns the value of <Date2> to <Date1> |
|
| Not Equal To | |||
<Date1>
<> <Date2> |
Boolean | Returns a value of true if <Date1> does not equal <Date2> |
|
| Less than | |||
<Date1> <
<Date2> |
Boolean | Returns a value of true if <Date1> is less than <Date2> |
|
| Greater than | |||
<Date1> >
<Date2> |
Boolean | Returns a value of true if <Date1> is greater than or equal to
<Date2> |
|
| Less than or Equal to | |||
<Date1> <=
<Date2> |
Boolean | Returns a value of true if <Date1> is less than or equal to
<Date2> |
|
| Greater than or Equal to | |||
<Date1> >=
<Date2> |
Boolean | Returns a value of true if <Date1> is greater than or equal to
<Date2> |
|
| In (Range) | |||
attributeReference
in [ |(rangeExpression)|]
|
Boolean | Returns a value of true if attributeReference is in the range of Date 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. |
|
| Year | |||
<Date>.year |
Integer | Returns the century/year portion of <Date> as a four digit Integer |
|
| Month | |||
<Date>.month |
Integer | Returns the month in <Date> as an Integer between 1 and 12 |
|
| Day | |||
<Date>.day |
Integer | Returns the day portion of <Date> as an Integer between 1 and
31 |
|
| Add years | |||
<Date>.addYears(<Integer>) |
Date | Adds the number of years in <Integer> to the number of years in
<Date> |
|
| Add months | |||
<Date>.addMonth(<Integer>) |
Date | Adds the number of months in <Integer> to the number of months in
<DateTime> |
|
| Add days | |||
<Date>.addDays(<Integer>) |
Date | Adds the number of days in <Integer> to the number of days in
<Date> |
|
| Years between | |||
<Date1>.yearsBetween(<Date2>) |
Integer | Returns the Integer number of years between
<Date1> and <Date2>. This function returns a
positive number if <Date2> is
later than <Date1>. |
|
| Months between | |||
<Date1>.monthsBetween(<Date2>) |
Integer | Returns the Integer number of months between
<Date1> and <Date2>. If the month and year portions
of <Date1> and <Date2> are
the same, the result is zero. This function returns a positive number if
<Date2> is later than
<Date1>. |
|
| Days between | |||
<Date1>.daysBetween(<Date2>) |
Integer | Returns the Integer number of days between
<Date1> and <Date2>. If the two dates differ by less
than a full 24-hour period, the value is zero. This function returns a
positive number if <Date2> is
later than <Date1>. |
|
| Day of Week | |||
<Date>.dayOfWeek |
Integer | Returns an Integer corresponding to day of the week,
with Sunday equal to 1, in <Date>. |
|
| Week of Year | |||
<Date>.weekOfYear |
Integer | Returns an Integer from 1 to 52, equal to the week
number within the year in <Date> |
|
| Day of Year | |||
<Date>.dayOfYear |
Integer | Returns an Integer from 1 to 366, equal to the day
number within the year in <Date> |
|
| Week of Month | |||
<Date>.weekOfMonth |
Integer | Returns an Integer from 1 to 6, equal to the week
number within the month in <DateTime> or <Date>. A week begins on Sunday and ends on
Saturday. |
|
| To String | |||
<Date>.toString |
String | Converts DateTime to a String with date and time information | |
| To DateTime | |||
<Date>.toDateTime |
DateTime | Returns a DateTime where the date portion is equal
to the value of <Date> and the
time portion is equal to 00:00:00 in the system’s local timezone
|
|
| To DateTime with Timezone Offset | |||
<Date>.toDateTime (<string>) |
DateTime | Returns a DateTime where the date portion is equal
to the value of <Date> and the
time portion is equal to 00:00:00 in the timezone specified by the value
of <string> |
|
| getMilliseconds | |||
<Date>.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. | |
| nextDay | |||
<Date>.nextDay |
Date | Returns the Date that represents the date that follows this Date instance. | |