 
   @doc false
   def iso_days_to_unit({days, {parts, ppd}}, unit) do
-    day_microseconds = days * @seconds_per_day * @microseconds_per_second
-    microseconds = div(parts * @seconds_per_day * @microseconds_per_second, ppd)
+    day_microseconds = days * @parts_per_day
+    microseconds = div(parts * @parts_per_day, ppd)
     System.convert_time_unit(day_microseconds + microseconds, :microsecond, unit)
   end
 

  @seconds_per_hour 60 * 60
  @seconds_per_day 24 * 60 * 60 # Note that this does _not_ handle leap seconds.
  @microseconds_per_second 1_000_000

  @days_per_nonleap_year 365
  @days_per_leap_year 366

  @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)
