rajbir / date-of-year
"一个基于给定日期计算年份天数的简单PHP包。"
v1.0.0
2023-06-30 06:32 UTC
Requires (Dev)
- phpunit/phpunit: ^10.2
This package is auto-updated.
Last update: 2024-09-30 01:50:52 UTC
README
DateOfYear是一个PHP类,用于计算给定年份与当前年份之间的差异。
安装
使用Composer来安装DateOfYear包。
composer require your-vendor-name/date-of-year Usage php Copy code use Dateofyear\DateOfYear; // Create a new instance of DateOfYear $dateOfYear = new DateOfYear(1995); // Get the year difference $difference = $dateOfYear->getYearDifference(); Testing DateOfYear includes unit tests using PHPUnit. To run the tests, use the following command: bash Copy code ./vendor/bin/phpunit tests/DateOfYearTest.php Contributing Contributions are welcome! If you find any issues or want to add new features, please open an issue or submit a pull request. License This project is licensed under the MIT License.