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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -