atomica.utils.datetime_to_year

atomica.utils.datetime_to_year(dt)[source]

Convert a DateTime instance to decimal year

For example, 1/7/2010 would be approximately 2010.5

Parameters:

dt (datetime) – The datetime instance to convert

Return type:

float

Returns:

Equivalent decimal year