Open Alexnortung opened 6 months ago
Subtracting dates with intervals seems to give the wrong output. for example, subtracting one year from 2022-01-01 returns 2021-01-06. But in postgres it produces the expected 2021-01-01.
2022-01-01
2021-01-06
2021-01-01
SELECT '2022-01-01'::date - interval '1 year'; SELECT '2022-01-01'::date - interval '1 month';
Used playground
Describe the bug
Subtracting dates with intervals seems to give the wrong output. for example, subtracting one year from
2022-01-01
returns2021-01-06
. But in postgres it produces the expected2021-01-01
.To Reproduce
pg-mem version
Used playground