       ~N[2000-02-29 23:00:07.0]
 
   """
-  @spec to_naive(t) :: NaiveDateTime.t
-  def to_naive(%DateTime{calendar: calendar, year: year, month: month, day: day,
-                         hour: hour, minute: minute, second: second, microsecond: microsecond}) do
-    %NaiveDateTime{year: year, month: month, day: day, calendar: calendar,
-                   hour: hour, minute: minute, second: second, microsecond: microsecond}
+  @spec to_naive(t) :: NaiveDateTime.t()
+  def to_naive(%DateTime{} = datetime) do
+    %DateTime{
+      calendar: calendar,
+      year: year,
+      month: month,
+      day: day,
+      hour: hour,
+      minute: minute,
+      second: second,
+      microsecond: microsecond
+    } = datetime
+
+    %NaiveDateTime{
+      year: year,
+      month: month,
+      day: day,
+      calendar: calendar,
+      hour: hour,
+      minute: minute,
+      second: second,
+      microsecond: microsecond
+    }
   end
 
   @doc """

                      zone_abbr: "AMT"}}

  """
  @spec convert(Calendar.datetime, Calendar.calendar) :: {:ok, t} | {:error, :incompatible_calendars}
  def convert(%{calendar: calendar, year: year, month: month, day: day,
                hour: hour, minute: minute, second: second, microsecond: microsecond,
                time_zone: time_zone, zone_abbr: zone_abbr, utc_offset: utc_offset, std_offset: std_offset}, calendar) do
    {:ok, %DateTime{calendar: calendar, year: year, month: month, day: day,
                    hour: hour, minute: minute, second: second, microsecond: microsecond,
                    time_zone: time_zone, zone_abbr: zone_abbr, utc_offset: utc_offset, std_offset: std_offset}}
  end

  def convert(%{calendar: dt_calendar, microsecond: {_, precision}} = datetime, calendar) do

      ~T[23:00:07.0]

  """
  @spec to_time(t) :: Time.t()
  def to_time(%DateTime{} = datetime) do
    %{hour: hour, minute: minute, second: second, microsecond: microsecond, calendar: calendar} =
      datetime

    %Time{
      hour: hour,
      minute: minute,
      second: second,
      microsecond: microsecond,
      calendar: calendar
    }
  end

  @doc """
