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

add overlap functionality to Timex.Interval #492

Conversation

glassbead0
Copy link
Contributor

Summary of changes

  • determine the overlap duration between
    two intervals.
  • Can specify a valid unit for Durations.
  • Will return a Duration struct or integer
    depending on the unit provided (default
    to :seconds)
  • Will return 0 (or eqivalent Duration
    struct) for intervals that do not overlap.

Checklist

  • New functions have typespecs, changed functions were updated
  • Same for documentation, including moduledocs
  • Tests were added or updated to cover changes
  • Commits were squashed into a single coherent commit

Copy link

@jasonnoble jasonnoble left a comment

Choose a reason for hiding this comment

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

👍

@glassbead0 glassbead0 force-pushed the add_overlap_duration_to_interval branch from bc21381 to 66fe784 Compare December 7, 2018 17:57
* determine the overlap duration between
  two intervals.
* Can specify a valid unit for Durations.
* Will return a Duration struct or integer
  depending on the unit provided (default
  to :seconds)
* Will return 0 (or eqivalent Duration
  struct) for intervals that do not overlap.
@glassbead0 glassbead0 force-pushed the add_overlap_duration_to_interval branch from 66fe784 to 09b30fc Compare December 7, 2018 17:58
@coveralls
Copy link

coveralls commented Dec 8, 2018

Coverage Status

Coverage increased (+0.3%) to 70.89% when pulling 09b30fc on glassbead0:add_overlap_duration_to_interval into 5107429 on bitwalker:master.

@glassbead0 glassbead0 closed this Dec 10, 2018
@glassbead0
Copy link
Contributor Author

changed the suggested implementation to return the overlap interval rather than the duration.
#493

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.

None yet

4 participants