Stars: 704
Forks: 47
Pull Requests: 76
Issues: 56
Watchers: 19
Last Updated: 2023-09-16 06:37:51
Period
is PHP's missing time range API. This package covers all basic operations regarding time ranges.
Full documentation can be found at period.thephpleague.com.
You need PHP >= 8.1.0 but the latest stable version of PHP is recommended.
Install Period
using Composer.
$ composer require league/period
or download the library and:
require 'path/to/period/repo/autoload.php';
use League\Period\Datepoint;
Datepoint::fromDateString('2012-05-23')->month()->toIso80000('Y-m-d');
//returns [2012-05-01, 2012-06-01)
where path/to/period/repo
represents the path where the library was extracted.
Period
has:
To run the tests, run the following command from the project folder.
$ composer test
Contributions are welcome and will be fully credited. Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Please see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see LICENSE for more information.