Converts the period into days as a float.
This will throw an exception if the time unit is not Days or Weeks.
quantlib