quantlib.time.daycounter.DayCounter¶
- class DayCounter¶
Bases:
object
This class provides methods for determining the length of a time period according to given market convention, both as a number of days and as a year fraction.
- __init__()¶
Methods
__init__
()day_count
(self, Date date1, Date date2)Returns the number of days between two dates.
from_name
(cls, name)year_fraction
(self, Date date1, Date date2, ...)Returns the period between two dates as a fraction of year.
Attributes
name
- day_count(self, Date date1, Date date2)¶
Returns the number of days between two dates.
- classmethod from_name(cls, name)¶
- year_fraction(self, Date date1, Date date2, Date ref_start=Date(), Date ref_end=Date())¶
Returns the period between two dates as a fraction of year.