This library provides some classes for date handling in PHP.
Use composer to install this library:
composer.phar require fadoe/dateCompare is a class to compare \DateTime classes. You must create a instance with the \DateTime to compare
against other \DateTime classes.
There are several compare methods:
| constant | compare strategy |
|---|---|
| Compare::GT_FROM_LT_TO | date from < compare date < date to |
| Compare::GT_FROM_LTEQ_TO | date from < compare date <= date to |
| Compare::GTEQ_FROM_LT_TO | date from <= compare date < date to |
| Compare::GTEQ_FROM_LTEQ_TO | date from <= compare date <= date to |
This class creates \DateTime classes between two dates.
A class to give some \DateTime classes. Usefull for classes that need the current date for calculation. With this
class you have a provider for dates and you can mock this in unit tests.