@balakirev,
Thanks for the template file and details.
Please notice, I am able to reproduce the issue as you mentioned by using your sample file. I found that DATEDIF function doesn’t work correctly with leap years. I used the following sample code with your sample file:
e.g.
Sample code:
Workbook workbook = new Workbook("f:\\files\\test.xlsx");
workbook.calculateFormula();
System.out.println(workbook.getWorksheets().get(0).getCells().get("C1").getValue());//141
System.out.println(workbook.getWorksheets().get(0).getCells().get("C2").getValue());//141 - Not Ok
I have logged a ticket with an id “CELLSJAVA-45035” for your issue. We will look into it soon.
Once we have an update on it, we will let you know.