Skip to main content

yearmonth

Return the position of a month: 1 - 12, where 1 is January.

def yearmonth(
name: str
) - > int

Return the position of a month: 1 - 12, where 1 is January.

Parameters

NameTypeDescription
namestrThe full name or three-letter abbreviation of the month to be converted.

Returns

TypeDescription
intThe numerical position of the month in the calendar year, ranging from 1 to 12.