NaiveDateTime.to_date

You're seeing just the function to_date, go back to NaiveDateTime module for more information.

Specs

Converts a NaiveDateTime into a Date.

Because Date does not hold time information, data will be lost during the conversion.

Examples

iex> NaiveDateTime.to_date(~N[2002-01-13 23:00:07])
~D[2002-01-13]