Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Testing of date/datetime range anchors requires too much logic. #8

Closed
rquadling opened this issue Jun 13, 2016 · 1 comment
Closed

Comments

@rquadling
Copy link
Contributor

Currently, to test a DateRange (or DateTimeRange) to see if it is anchored in the PAST/FUTURE or both (INFINITE), you have to create a new DateTime(DateRange::PAST) or DateTime(DateTimeRange::PAST).

#7 allows you to simply test your existing range (date or datetime).

$dr1 = new DateRange(new DateTime('2006-09-06'), new DateTime('2006-09-15'));
$dr1->isPast(); // false
@gws
Copy link
Owner

gws commented Jun 13, 2016

Closed by #7. Thanks!

@gws gws closed this as completed Jun 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants