rajbir/date-of-year

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

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:find-year

pkg:composer/rajbir/date-of-year

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

This package is auto-updated.

Last update: 2025-12-29 03:47:45 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.