quantlib.time.date.weeks

weeks(Period p)

Converts the period into weeks as a float.

This will throw an exception if the time unit is not Days or Weeks.