def METHOD_NAME(fname, disp_ifgram='all', disp_num=False, max_num=1e4, print_msg=False):
    """Print time/date info of file"""
    k = readfile.read_attribute(fname)['FILE_TYPE']
    dateList = None
    if k in ['timeseries']:
        dateList = timeseries(fname).get_date_list()
    elif k == 'HDFEOS':
        dateList = HDFEOS(fname).get_date_list()
    elif k == 'giantTimeseries':
        dateList = giantTimeseries(fname).get_date_list()
    elif k in ['giantIfgramStack']:
        dateList = giantIfgramStack(fname).get_date12_list()
    elif k in ['ifgramStack']:
        obj = ifgramStack(fname)
        obj.open(print_msg=False)
        dateListAll = obj.get_date12_list(dropIfgram=False)
        dateListKept = obj.get_date12_list(dropIfgram=True)
        # show dropped ifgram or not
        if disp_ifgram == 'all':
            dateList = list(dateListAll)
        elif disp_ifgram == 'kept':
            dateList = list(dateListKept)
        else:
            dateList = sorted(list(set(dateListAll) - set(dateListKept)))
    else:
        print(f'--date option can not be applied to {k} file, ignore it.')
    # print list info
    max_num = int(max_num)
    if print_msg and dateList is not None:
        for d in dateList[:max_num]:
            if disp_num:
                if k in ['ifgramStack']:
                    num = dateListAll.index(d)
                else:
                    num = dateList.index(d)
                msg = f'{d}\t{num}'
            else:
                msg = d
            print(msg)
        # add ... at the end if --compact
        if max_num < len(dateList):
            print('...\n')
    return dateList