tplaner / When

PHP Date Recursion library
https://github.com/tplaner/When
MIT License
513 stars 96 forks source link

Make it possible to use other time objects than \DateTime #51

Closed burzum closed 3 years ago

burzum commented 8 years ago

The lib has hard dependencies on a few base classes:

$this->until(new \DateTime($param));
$this->until->add(new \DateInterval('P400Y'));

It should be possible to change them. Either by providing a method than can be overloaded or a getter and setter that will allow me to define the interval and date objects.

Calling the classes directly in the code makes it impossible to work with custom date objects.

tplaner commented 3 years ago

Good idea, will take this into consideration for a future rewrite.