diff options
author | José Valim <jose.valim@dashbit.co> | 2022-01-02 19:59:50 +0100 |
---|---|---|
committer | José Valim <jose.valim@dashbit.co> | 2022-01-02 19:59:50 +0100 |
commit | 40b512031f9ea68b4fbcf57d323cbedf4568cdfe (patch) | |
tree | 26ef1a1004d24ccd5c1e57aceafd3f1fae9e957b | |
parent | 3c6b8a96e57e3c04ef3d531fc932f0bf88a3d009 (diff) | |
download | elixir-40b512031f9ea68b4fbcf57d323cbedf4568cdfe.tar.gz |
Use more precise headers on Date function docs, closes #11533
-rw-r--r-- | lib/elixir/lib/calendar/date.ex | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/elixir/lib/calendar/date.ex b/lib/elixir/lib/calendar/date.ex index e1b6e8334..d2d7c647a 100644 --- a/lib/elixir/lib/calendar/date.ex +++ b/lib/elixir/lib/calendar/date.ex @@ -990,6 +990,8 @@ defmodule Date do """ @doc since: "1.11.0" @spec beginning_of_month(Calendar.date()) :: t() + def beginning_of_month(date) + def beginning_of_month(%{year: year, month: month, calendar: calendar}) do %Date{year: year, month: month, day: 1, calendar: calendar} end @@ -1009,6 +1011,8 @@ defmodule Date do """ @doc since: "1.11.0" @spec end_of_month(Calendar.date()) :: t() + def end_of_month(date) + def end_of_month(%{year: year, month: month, calendar: calendar} = date) do day = Date.days_in_month(date) %Date{year: year, month: month, day: day, calendar: calendar} |