Date.beginning_of_month

You're seeing just the function beginning_of_month, go back to Date module for more information.
Link to this function

beginning_of_month(map)

View Source (since 1.11.0)

Specs

beginning_of_month(Calendar.date()) :: t()

Calculates a date that is the first day of the month for the given date.

Examples

iex> Date.beginning_of_month(~D[2000-01-31])
~D[2000-01-01]
iex> Date.beginning_of_month(~D[2000-01-01])
~D[2000-01-01]
iex> Date.beginning_of_month(~N[2000-01-31 01:23:45])
~D[2000-01-01]