Skip to content

Commit

Permalink
feat: change temporal add and subtract
Browse files Browse the repository at this point in the history
  • Loading branch information
rok committed Sep 19, 2022
1 parent 6f603d3 commit 36f4950
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions extensions/functions_datetime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ scalar_functions:
return: i64
-
name: "add"
description: Add an interval to a date/time type.
description: >-
Add an interval to a date/time type.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is not present then UTC is assumed. If timezone is invalid an error is thrown.
impls:
- args:
- name: x
Expand All @@ -48,7 +53,10 @@ scalar_functions:
value: timestamp_tz
- name: y
value: interval_year
return: timestamp
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: timestamp_tz
- args:
- name: x
value: date
Expand All @@ -66,7 +74,7 @@ scalar_functions:
value: timestamp_tz
- name: y
value: interval_day
return: timestamp
return: timestamp_tz
- args:
- name: x
value: date
Expand All @@ -91,7 +99,12 @@ scalar_functions:
return: interval_year
-
name: "subtract"
description: Subtract an interval from a date/time type.
description: >-
Subtract an interval from a date/time type.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is not present then UTC is assumed. If timezone is invalid an error is thrown.
impls:
- args:
- name: x
Expand All @@ -104,6 +117,9 @@ scalar_functions:
value: timestamp_tz
- name: y
value: interval_year
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: timestamp_tz
- args:
- name: x
Expand Down

0 comments on commit 36f4950

Please sign in to comment.