javascript - parsing DBF files and excluding lines that have a set date condition -
i have following code:
parseaccountrecord = (dbfr) -> # parse records yesterday = moment().subtract(1,'days') createdat = new moment(dbfr.sn_fcreate, "yyyymmdd") lastcreated = yesterday.diff(createdat, 'days') updatedat = new moment(dbfr.sn_lupdate, "yyyymmdd") lastupdated = yesterday.diff(updatedat, 'days') if dbfr['@deleted'] or lastupdated > 2 or lastcreated > 2 return null
basically want exclude records lastupdate date 2 days older or last created dates 2 days older set?
what missing?
any advice appreciated.
Comments
Post a Comment