   defp days_before_month(12), do: 334
 
   defp leap_day_offset(_year, month) when month < 3, do: 0
+
   defp leap_day_offset(year, _month) do
     if leap_year?(year), do: 1, else: 0
   end


  defp div_mod(int1, int2) do
    div = div(int1, int2)
    mod = int1 - (div * int2)
    {div, mod}
  end



  """
  @impl true
  @spec time_from_day_fraction(Calendar.day_fraction()) ::
          {Calendar.hour(), Calendar.minute(), Calendar.second(), Calendar.microsecond()}
  def time_from_day_fraction({parts_in_day, parts_per_day}) do
    total_microseconds = div(parts_in_day * @parts_per_day, parts_per_day)

    {hours, rest_microseconds1} =
      div_mod(total_microseconds, @seconds_per_hour * @microseconds_per_second)

    {minutes, rest_microseconds2} =
      div_mod(rest_microseconds1, @seconds_per_minute * @microseconds_per_second)

    {seconds, microseconds} = div_mod(rest_microseconds2, @microseconds_per_second)
    {hours, minutes, seconds, {microseconds, 6}}
  end
