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

Introduce isPast(), isFuture() and isInfinite() on DateRanges and DateTimeRanges #7

Merged
merged 1 commit into from
Jun 13, 2016

Conversation

rquadling
Copy link
Contributor

Allow users to determine if a date/datetime range is anchored in the past, the future or both.

*/
public function isInfinite()
{
return self::infinite() == $this;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be static:: instead of self::, in case infinite() is overridden by a subclass. It's also consistent with the isFuture() and isPast().

@gws
Copy link
Owner

gws commented Jun 13, 2016

Thank you! If you want to resolve that small change I suggested and rebase I can merge this.

@rquadling
Copy link
Contributor Author

How do you rebase in github?

@gws
Copy link
Owner

gws commented Jun 13, 2016

@rquadling Hmm, I just meant to squash the commit. You can squash commits interactively using git rebase -i on the branch you're requesting that I merge, and then force-push. GitHub will see that you've done this and this PR will be updated automatically.

git rebase -i HEAD~1 in your case.

https://ariejan.net/2011/07/05/git-squash-your-latests-commits-into-one/

…eTimeRanges

Allow users to determine if a date/datetime range is anchored in the past, the future or both.
@rquadling
Copy link
Contributor Author

Tada!

@gws gws merged commit 638ebfd into gws:master Jun 13, 2016
gws added a commit that referenced this pull request Jun 13, 2016
@gws
Copy link
Owner

gws commented Jun 13, 2016

Thank you, and I've released v0.4.0 with these changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants