Period.is_epoch_agnostic#
- Period.is_epoch_agnostic()[source]#
Return True if the way that this period splits the timeline does not depend on the epoch used to perform calculations.
This method assumes that the epoch will always be midnight at the start of the first day of a year.
Most commonly used periods such as P1Y, P1M, P1D, PT15M and so on are epoch agnostic.
A period such as P7D is not epoch agnostic however. The calculation will typically be done using modulus arithmetic on the number of days since the epoch, and this will split the timeline into different 7-day intervals depending on the epoch.
- Return type:
- Returns:
True if this period splits the timeline into the same intervals regardless of the epoch, False otherwise.