简体   繁体   中英

nodejs package for parsing excel formula DATEDIF in months?

looking for nodejs package that can read and process formula excel datedif in months

im currently using handsontable/RuleJS https://handsontable.github.io/ruleJS/

but there is no datedif in month

i need a tool because the excel formula might be complex

from the current package i can do this in days

'IF(DAYS("6/6/2019","1/1/2019") >= 30,

now i need in months

if you have access to just the fields then moment may work ( npm i moment ):

var moment = require('moment');

// 'IF(DAYS("6/6/2019","1/1/2019") >= 30,
var result = moment('6/6/2019').add(1, 'months').isAfter(moment('1/1/2019'));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM