from datetime import datetime


def get_year(mat_date):
    """
    Calc year from matlab's date format
    Parameters
    ----------
    mat_date : matlab's datenum
        Date to be converted
    Return
    ----------
    year : int
        Year from matlab datenum
    """
    temp = int(mat_date)
    year = datetime.fromordinal(max(temp - 366, 1)).year
    return year