text: public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {if (args.length != 2) {return ErrorEval.VALUE_INVALID;}try {double startDateAsNumber = NumericFunction.singleOperandEvaluate(args[0], ec.getRowIndex(), ec.getColumnIndex());int months = (int) NumericFunction.singleOperandEvaluate(args[1], ec.getRowIndex(), ec.getColumnIndex());if (startDateAsNumber >= 0.0 && startDateAsNumber < 1.0) {startDateAsNumber = 1.0;}Date startDate = DateUtil.getJavaDate(startDateAsNumber, false);Calendar cal = LocaleUtil.getLocaleCalendar();cal.setTime(startDate);cal.clear(Calendar.HOUR);cal.set(Calendar.HOUR_OF_DAY, 0);cal.clear(Calendar.MINUTE);cal.clear(Calendar.SECOND);cal.clear(Calendar.MILLISECOND);cal.add(Calendar.MONTH, months + 1);cal.set(Calendar.DAY_OF_MONTH, 1);cal.add(Calendar.DAY_OF_MONTH, -1);return new NumberEval(DateUtil.getExcelDate(cal.getTime()));} catch (EvaluationException e) {return e.getErrorEval();}}