По какой-то причине justify_interval(now() - '2013-02-14'::timestamptz)
производит странные результаты:почему justify_interval ('360 дней' :: интервальные) результаты '1 год'
postgres=# select justify_interval(concat(365*4 +1,' days')::interval); -[ RECORD 1 ]----+----------------
justify_interval | 4 years 21 days
Я проверил один год:
postgres=# select justify_interval('365 days'::interval);
justify_interval
------------------
1 year 5 days
Так что я пошел дальше :
postgres=# select justify_interval('360 days'::interval);
justify_interval
------------------
1 year
(1 row)
Такое поведение не конкретной платформы (пробовал несколько дистрибутивов Linux, 9.2, 9.3, 9.6)
Почему один год составляет 360 дней ..