ddvzwzjm / isda-day-count-convention
Calculate dates difference according to ISDA specification with PHP
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ddvzwzjm/isda-day-count-convention
Requires (Dev)
- phpunit/phpunit: ^7.4
This package is auto-updated.
Last update: 2025-10-10 10:32:55 UTC
README
Calculate dates difference according to ISDA specification https://www.isda.org/a/aqMDE/2000-ISDA-Definitions-and-Annex.pdf
Usage
Install it from packagist
composer install ddvzwzjm/isda-day-count-convention
Use it in your code
$beginDate = new \DateTime('2007-02-28');
$endDate = new \DateTime('2007-03-31');
print ISDA::dateDiff30360($beginDate, $endDate); // 33 days
print ISDA::dateDiff30E360Isda($beginDate, $endDate); // 30 days
print ISDA::dateDiff30E360Eurobond($beginDate, $endDate); // 32 days
print ISDA::dateDiffActual360($beginDate, $endDate); // 31 days