quantlib.time.date.days

days(Period p)

Converts the period into days as a float.

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