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