📅  最后修改于: 2022-03-11 15:05:19.356000             🧑  作者: Mango
create function end_of_month(date)
returns date as
$$
select (date_trunc('month', $1) + interval '1 month' - interval '1 day')::date;
$$ language 'sql'
immutable strict;