Calendar.index#

Calendar.index(date) int#

Returns the index (0-based position) of the date.

Parameters:

date (datetime) – the date whose index is searched

Raises:

ValueError – If date is not in calendar

Returns:

Position (0-based) of the date

Return type:

int