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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -