Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leap year calculation correction #3981

Closed
1 task
H0rux opened this issue Apr 12, 2024 · 2 comments
Closed
1 task

Leap year calculation correction #3981

H0rux opened this issue Apr 12, 2024 · 2 comments

Comments

@H0rux
Copy link

H0rux commented Apr 12, 2024

This is:

- [ ] a bug report

What is the expected behavior?

File described here https://github.com/PHPOffice/PhpSpreadsheet/blob/master/tests/data/Calculation/DateTime/YEARFRAC.php does not calculate accurately after 2024, so leap years 2028, 2032, etc are having slight miscalculation

What are the steps to reproduce?

No adequate steps, file provided simply does not have data after 2024.
Issue is happening when using PMT function.

What features do you think are causing the issue

  • Formula Calculations

Does an issue affect all spreadsheet file formats? If not, which formats are affected?

All

Which versions of PhpSpreadsheet and PHP are affected?

1.2.5
2.0.0

@oleibman
Copy link
Collaborator

I do not understand your issue. The file you point to consists only of test data, not code. Even so, it is test data for YEARFRAC, and your issue says there is a problem with PMT. Do you have an example where PhpSpreadsheet returns the wrong value for YEARFRAC or PMT?

@H0rux
Copy link
Author

H0rux commented Apr 17, 2024

Hi again,

Apologies for long delay in reply, I wanted my team to review everything thoroughly again.

We are using this for client work, so I cannot share data and there is no way to anonymize it. The issue we are seeing is the usage of PMT in Excel vs usage in PMT in your code, that seems to be surfacing after 2028 leap year.

We made a correction in data from excel to account for this small anomaly.

I would only ask if you can keep an on other potential reports regarding leap year.

I will close this issue now, as I would not like to waste your time furher.

@H0rux H0rux closed this as completed Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants