Skip to content

Commit

Permalink
Update docs to include bound-open
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvind Maan committed Sep 23, 2020
1 parent e32992e commit 3b31ff4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/docstrings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ isbounded(::AbstractInterval)
"""
minimum(interval::AbstractInterval{T}; [increment]) -> T
The minimum value in the interval contained within the interval.
The minimum value in the interval contained within the `interval`.
If left-closed, returns `first(interval)`.
If left-open, returns `first(interval) + eps(first(interval))`
If left-unbounded, returns minimum value possible for type `T`.
A `BoundsError` is thrown for empty intervals or when the increment results in a minimum value
Expand All @@ -122,9 +123,10 @@ minimum(::AbstractInterval; increment)
"""
maximum(interval::AbstractInterval{T}; increment::Any) -> T
The maximum value in the interval contained within the interval.
The maximum value in the interval contained within the `interval`.
If right-closed, returns `last(interval)`.
If right-open, returns `first(interval) + eps(first(interval))`
If right-unbounded, returns maximum value possible for type `T`.
A `BoundsError` is thrown for empty intervals or when the increment results in a maximum value
Expand Down
1 change: 0 additions & 1 deletion test/anchoredinterval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ using Intervals: Bounded, Ending, Beginning, canonicalize, isunbounded

@test first(interval) == Date(2016, 8, 11)
@test last(interval) == Date(2016, 8, 12)
# throws domain error
@test_throws BoundsError minimum(interval, increment=Day(1))
@test_throws BoundsError maximum(interval, increment=Day(1))
@test bounds_types(interval) == (Open, Open)
Expand Down

0 comments on commit 3b31ff4

Please sign in to comment.