Skip to content

Commit 26fbd04

Browse files
authored
fix(extensions)!: correct return type for subtract:date_iday operation (#1029)
BREAKING CHANGE: changes the return type of the `subtract:date_iday` function from `date` to `precision_timestamp`
1 parent 5c4f1e1 commit 26fbd04

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

extensions/functions_datetime.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ scalar_functions:
342342
value: date
343343
- name: y
344344
value: interval_day<P>
345-
return: date
345+
return: precision_timestamp<P>
346346
-
347347
name: "lte"
348348
description: less than or equal to

tests/cases/datetime/subtract_datetime.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ subtract(2016-12-01T13:30:15::pts<6>, P5Y::iyear) = 2011-12-01T13:30:15::pts<6>
77
subtract(2016-12-01T13:30:15::pts<6>, PT5H::iday) = 2016-12-01T08:30:15::pts<6>
88

99
# date: examples using the date type
10-
subtract(2020-12-31::date, P5D::iday) = 2020-12-26::date
10+
subtract(2020-12-31::date, P5D::iday<0>) = 2020-12-26T00:00:00::pts<0>
1111
subtract(2020-12-31::date, P5Y::iyear) = 2015-12-31::date
1212
subtract(2020-12-31::date, P5M::iyear) = 2020-07-31::date
1313

1414
# null_input: examples with null args or return
15-
subtract(null::date?, P5D::iday) = null::date?
15+
subtract(null::date?, P5D::iday<0>) = null::pts?<0>

0 commit comments

Comments
 (0)