def day2dekad(day):
    """Returns the dekad of a day.

    Parameters
    ----------
    day : int
        Day of the date.

    Returns
    -------
    dekad : int
        Number of the dekad in a month.
    """

    if day < 11:
        dekad = 1
    elif day > 10 and day < 21:
        dekad = 2
    else:
        dekad = 3

    return dekad