Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement contains, intersection and of methods for Interval #64

Merged
merged 3 commits into from
May 19, 2023

Conversation

someniatko
Copy link
Contributor

closes #63

@someniatko
Copy link
Contributor Author

Do you think it makes sense to also implement isEqualTo() and toNativeDatePeriod()?

@someniatko someniatko changed the title Implement contains, intersection and of methods for Instant Implement contains, intersection and of methods for Interval Aug 15, 2022
@someniatko
Copy link
Contributor Author

@BenMorel ping 🤸

Copy link
Member

@BenMorel BenMorel left a comment

Choose a reason for hiding this comment

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

A couple changes, otherwise looks good to me 👍

tests/IntervalTest.php Show resolved Hide resolved
src/Interval.php Show resolved Hide resolved
tests/IntervalTest.php Outdated Show resolved Hide resolved
tests/IntervalTest.php Outdated Show resolved Hide resolved
tests/IntervalTest.php Outdated Show resolved Hide resolved
BenMorel

This comment was marked as duplicate.

@BenMorel
Copy link
Member

Do you think it makes sense to also implement isEqualTo() and toNativeDatePeriod()?

  • isEqualTo(): yes, and you may use it in your tests as per my comment
  • toNativeDatePeriod(): it looks like DatePeriod is about recurring periods, so I don't think they represent the same concept. I'd pass on this one.

@someniatko
Copy link
Contributor Author

someniatko commented May 18, 2023

Okay, I will implement isEqualTo() as well.

@someniatko someniatko force-pushed the interval-enhancements branch 2 times, most recently from 05976ba to b44c4c1 Compare May 18, 2023 08:35
@someniatko
Copy link
Contributor Author

Done! Code coverage has been decreased for the classes this PR is not responsible for, maybe something has changed in the method of the coverage calculation.

@someniatko someniatko requested a review from BenMorel May 18, 2023 09:05
tests/IntervalTest.php Show resolved Hide resolved
src/Interval.php Outdated Show resolved Hide resolved
@BenMorel BenMorel merged commit 8739cbb into brick:master May 19, 2023
6 of 7 checks passed
@BenMorel
Copy link
Member

Thank you! Released as 0.4.2 🎉

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

Successfully merging this pull request may close these issues.

Interval is so barebones compared to LocalDateRange
2 participants