From 1389bdc1ab3da19a1ece3f6a5d9a12bf147af518 Mon Sep 17 00:00:00 2001 From: Miha Zgubic Date: Fri, 14 Aug 2020 12:30:34 +0200 Subject: [PATCH 1/2] add inclusivity default info to the docstrings for HourEnding and HourBeginning --- src/anchoredinterval.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/anchoredinterval.jl b/src/anchoredinterval.jl index a9b9ea38..2b673195 100644 --- a/src/anchoredinterval.jl +++ b/src/anchoredinterval.jl @@ -118,7 +118,7 @@ AnchoredInterval{P}(anchor::T) where {P,T} = AnchoredInterval{P,T}(anchor) HourEnding{T<:TimeType, L, R} <: AbstractInterval{T} A type alias for `AnchoredInterval{Hour(-1), T}` which is used to denote a 1-hour period of -time which ends at a time instant (of type `T`). +time which ends at a time instant (of type `T`). Inclusivity defaults to {Open, Closed}. """ const HourEnding{T,L,R} = AnchoredInterval{Hour(-1), T, L, R} where {T, L <: Bounded, R <: Bounded} HourEnding(anchor::T) where T = HourEnding{T}(anchor) @@ -129,7 +129,7 @@ HourEnding(anchor::T) where T = HourEnding{T}(anchor) HourBeginning{T<:TimeType, L, R} <: AbstractInterval{T} A type alias for `AnchoredInterval{Hour(1), T}` which is used to denote a 1-hour period of -time which begins at a time instant (of type `T`). +time which begins at a time instant (of type `T`). Inclusivity defaults to {Closed, Open}. """ const HourBeginning{T,L,R} = AnchoredInterval{Hour(1), T, L, R} where {T, L <: Bounded, R <: Bounded} HourBeginning(anchor::T) where T = HourBeginning{T}(anchor) From 282676f34f661368be7550ab4d3a34d1399fb28f Mon Sep 17 00:00:00 2001 From: Miha Zgubic Date: Mon, 17 Aug 2020 14:49:48 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Curtis Vogt --- src/anchoredinterval.jl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/anchoredinterval.jl b/src/anchoredinterval.jl index 2b673195..b51b4ef2 100644 --- a/src/anchoredinterval.jl +++ b/src/anchoredinterval.jl @@ -118,7 +118,10 @@ AnchoredInterval{P}(anchor::T) where {P,T} = AnchoredInterval{P,T}(anchor) HourEnding{T<:TimeType, L, R} <: AbstractInterval{T} A type alias for `AnchoredInterval{Hour(-1), T}` which is used to denote a 1-hour period of -time which ends at a time instant (of type `T`). Inclusivity defaults to {Open, Closed}. +time which ends at a time instant (of type `T`). + +When constructing an instance of `HourEnding{T}` the resulting interval will right-closed +(of type `HourEnding{T,Open,Closed}`). """ const HourEnding{T,L,R} = AnchoredInterval{Hour(-1), T, L, R} where {T, L <: Bounded, R <: Bounded} HourEnding(anchor::T) where T = HourEnding{T}(anchor) @@ -129,7 +132,10 @@ HourEnding(anchor::T) where T = HourEnding{T}(anchor) HourBeginning{T<:TimeType, L, R} <: AbstractInterval{T} A type alias for `AnchoredInterval{Hour(1), T}` which is used to denote a 1-hour period of -time which begins at a time instant (of type `T`). Inclusivity defaults to {Closed, Open}. +time which begins at a time instant (of type `T`). + +When constructing an instance of `HourBeginning{T}` the resulting interval will left-closed +(of type `HourBeginning{T,Closed,Open}`). """ const HourBeginning{T,L,R} = AnchoredInterval{Hour(1), T, L, R} where {T, L <: Bounded, R <: Bounded} HourBeginning(anchor::T) where T = HourBeginning{T}(anchor)