rajbir / date-of-year
"A simple PHP package to calculate the day of the year based on a given date."
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:find-year
Requires (Dev)
- phpunit/phpunit: ^10.2
This package is auto-updated.
Last update: 2024-12-30 02:34:01 UTC
README
DateOfYear is a PHP class that calculates the difference between a given year and the current year.
Installation
Use Composer to install the DateOfYear package.
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.