         }
 
   @unix_days :calendar.date_to_gregorian_days({1970, 1, 1})
+  @seconds_per_day 24 * 60 * 60
+  @microseconds_per_second 1_000_000
+  @microseconds_per_day @seconds_per_day * @microseconds_per_second
 
   @doc """
   Returns the current datetime in UTC.

  end

  @doc """
  Converts the given `datetime` to a string according to its calendar.

  ### Examples

    }
  end

  defp div_mod(int1, int2) do
    div = div(int1, int2)
    rem = int1 - div * int2

    if rem >= 0 do
      {div, rem}
    else
      {div - 1, rem + int2}
    end
  end

  defp seconds_from_day_fraction({parts_in_day, @seconds_per_day}),
    do: parts_in_day

  defp seconds_from_day_fraction({parts_in_day, parts_per_day}),
    do: div(parts_in_day * @seconds_per_day, parts_per_day)

  defimpl String.Chars do
    def to_string(datetime) do
      %{
