Date & Time
Temporal functions
date(from)
converts from to a date
Name | Required | Type | Description |
---|---|---|---|
from |
Yes |
Text | Date and time |
Date |
date("2016‐12‐09") => 2016-12-09
date("2012-12-25") – date("2012-12-24") => P1D
date(year, month, day)
creates a date from year, month, day component values
Name | Required | Type | Description |
---|---|---|---|
year |
Yes |
Number |
|
month |
Yes |
Number |
|
day |
Yes |
Number |
Date |
date(2012, 12, 25) => 2012-12-25
date(2012, 12, 25) = date("2012-12-25") => true
date and time(date, time, [timezone])
creates a date time from the given date, the given time and the given timezone if provided
Name | Required | Type | Description |
---|---|---|---|
date |
Yes |
Date | Date and time |
|
time |
Yes |
Time |
|
timezone |
No |
Text |
Date and time |
date and time(2017-11-24, 23:45:00) => 2017-11-24T23:45:00
date and time(date(2017,03,23), time("15:35:05")) => 2017-03-23T15:35:05
date and time(date("2024-12-24"), time("23:59:00"), "Z") => 2024-12-24T23:59:00Z
date and time(date("2024-06-18"), time("11:30:59"), "America/New_York]") => 2024-06-18T11:30:59-04:00@America/New_York
date and time(from)
converts from to a date and time
Name | Required | Type | Description |
---|---|---|---|
from |
Yes |
Date and time | Text |
Date and time |
date and time("2017‐11‐24T23:45:00") => 2017-11-24T23:45:00
day of week(date)
returns the day of the week according to the Gregorian calendar enumeration: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
Name | Required | Type | Description |
---|---|---|---|
date |
Yes |
Date | Date and time |
Text |
day of week(date and time("2019-10-01T12:05:39")) => Sunday
day of week(date("2019-01-31")) => Thursday
day of year(date)
returns the Gregorian number of the day within the year
Name | Required | Type | Description |
---|---|---|---|
date |
Yes |
Date | Date and time |
Number |
day of year(date and time("2019-10-01T12:05:39")) => 274
day of year(date("2019-01-31")) => 31
duration(from)
converts from to a days and time or years and months duration
Name | Required | Type | Description |
---|---|---|---|
from |
Yes |
duration | Text |
duration |
duration(PT1600H) => P66DT16H a duration of 66 days and 16 hours
duration("P1Y2M") => P1Y2M a duration of 1 year and 2 months
is(value1, value2)
returns true if both values are the same element in the FEEL semantic domain D.
Name | Required | Type | Description |
---|---|---|---|
value1 |
Yes |
Date | Date and time |
|
value2 |
Yes |
Date | Date and time |
Boolean |
is(date("2012-12-25"), time("23:00:50")) => false
is(date("2012-12-25"), date("2012-12-25")) => true
is(time("23:00:50Z"), time("23:00:50")) => false
is(time("23:00:50Z"), time("23:00:50+00:00")) => true
month of year(date)
returns the month of the year according to the Gregorian calendar enumeration: January, February, March, April, May, June, July, August, September, October, November, December
Name | Required | Type | Description |
---|---|---|---|
date |
Yes |
Date | Date and time |
Text |
month of year(date and time("2019-10-01T12:05:39")) => October
month of year(date("2019-01-31")) => January
time(from)
converts from to time
Name | Required | Type | Description |
---|---|---|---|
from |
Yes |
Text | Date and time |
Time |
time("15:37:00") => 15:37 hours
time(hour, minute, second, [offset])
creates a time from the given component values
Name | Required | Type | Description |
---|---|---|---|
hour |
Yes |
Number |
|
minute |
Yes |
Number |
|
second |
Yes |
Number |
|
offset |
No |
days and time duration |
Time |
time(15,37,00, null) => 15:37:00
time(15,37,00,duration("-PT5H") => 15:37:00-05:0
time(15,37,00) => 15:37:00
week of year(date)
returns the Gregorian number of the week within the year
Name | Required | Type | Description |
---|---|---|---|
date |
Yes |
Date | Date and time |
Number |
week of year(date and time("2019-10-01T12:05:39")) => 40
week of year(date("2019-01-31")) => 5
years and months duration(from, to)
returns years and months duration between from and to
Name | Required | Type | Description |
---|---|---|---|
from |
Yes |
Date and time |
|
to |
Yes |
Date and time |
Years and months duration |
years and months duration(date("2015-12-25"),date(2017,11,22)) => P1Y10M a duration of 1 year and 10 months