def METHOD_NAME(pfile, maxdates=MAXDATES, dataframe=False):
    """Quick scan dates in a simulation restart file.
    Cf. grid_properties.py description
    """
    seq = _cxtgeo.new_intarray(maxdates)
    day = _cxtgeo.new_intarray(maxdates)
    mon = _cxtgeo.new_intarray(maxdates)
    yer = _cxtgeo.new_intarray(maxdates)
    cfhandle = pfile.get_cfhandle()
    nstat = _cxtgeo.grd3d_ecl_tsteps(cfhandle, seq, day, mon, yer, maxdates)
    pfile.cfclose()
    sq = []
    da = []
    for i in range(nstat):
        sq.append(_cxtgeo.intarray_getitem(seq, i))
        dday = _cxtgeo.intarray_getitem(day, i)
        dmon = _cxtgeo.intarray_getitem(mon, i)
        dyer = _cxtgeo.intarray_getitem(yer, i)
        date = f"{dyer:4}{dmon:02}{dday:02}"
        da.append(int(date))
    for item in [seq, day, mon, yer]:
        _cxtgeo.delete_intarray(item)
    zdates = list(zip(sq, da))  # list for PY3
    if dataframe:
        cols = ["SEQNUM", "DATE"]
        df = pd.DataFrame.from_records(zdates, columns=cols)
        return df
    return zdates