Calendars.ITimeMeasure

Classes

ITimeMeasure General interface to compute the duration in years between two dates.
date date(year, month, day) –> date object
class Calendars.ITimeMeasure.ITimeMeasure[source]

General interface to compute the duration in years between two dates.

See also

CalendarTimeMeasure
CalendarTimeMeasure

Methods

to_duration((date: datetime.date) -> float) Compute the duration in years between the reference date and the inputted date.
to_duration(date: datetime.date) → float[source]

Compute the duration in years between the reference date and the inputted date.

Parameters:

date : date

Date that one wants to convert to a duration.

Returns:

duration : float

The duration in years between the inputted date and the reference date.