rajbir/date-of-year

"A simple PHP package to calculate the day of the year based on a given date."

v1.0.0 2023-06-30 06:32 UTC

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.