postgres=# select extract(day from ((CAST(-3 || 'day' as interval)+now()) - now())); date_part ----------- -2 (1 row) Here I believe that the correct result should be -3.
Note that it passes with values upper than -2 and lower than -127: Also note that this happens only with the timezone set where time -1day.
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.