Comment

Comment by cldellow

No, for example, the datediff in years for New Year's Eve and New Year's Day should be 1 (because it spans a year boundary), but EXTRACT on the difference would give you 0:

    select extract(year from '2021-01-01'::timestamptz - '2020-12-31'::timestamptz);
parent cldellow 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton