DAYS360 function working incorrectly in case of leap day

In the attached file, cell E4 has the formula =DAYS360(C4,D4) and gives a value of 300 when run on a desktop version of Excel.

When calculated in Aspose Cells for Java, using the following code:

Workbook workbook = new Workbook("/Users/user1/files/days360.xlsx");
workbook.calculateFormula();
System.out.println(workbook.getWorksheets().get("Sheet1").getCells().get("E4").getDisplayStringValue());

The output is 301 which is wrong. The version of Aspose Cells for Java used is 23.10 and 23.9.

days360.xlsx.zip (6.7 KB)

@dvector
Through testing with sample files and code, we can reproduce the issue. Discovered that DAYS360 made a calculation error during leap years.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSJAVA-45669

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@dvector,

This is to inform you that your issue (logged as “CELLSJAVA-45669”) has been resolved. The fix will be included in the upcoming release (Aspose.Cells v23.11) that we plan to release in the first half of November. You will be notified when new version is released.

The issues you have found earlier (filed as CELLSJAVA-45669) have been fixed in Aspose.Cells for Java 23.11.