TimeFormat.get_conversion_factors#

TimeFormat.get_conversion_factors(to_time_format)[source]#

Get the conversion factors for each time period.

Get a dictionary of the values to multiply each time period by in order to convert between time formats

Parameters:

to_time_format (TimeFormat) – The time format you want to convert this time format to. Cannot be the same TimeFormat as this.

Returns:

A dictionary of conversion factors for each time period. Keys will the the time period, and values are the conversion factors.

Return type:

conversion_factors

Raises:

ValueError: – If any of the given values are invalid, or to_time_format is the same TimeFormat as self.