Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions period.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ type Period struct {
}

func NewPeriod(startDate, endDate time.Time, boundaryType string) Period {
if startDate.After(endDate) {
startDate, endDate = endDate, startDate
}

if _, ok := boundaryTypes[boundaryType]; !ok {
boundaryType = IncludeStartExcludeEnd
}
Expand All @@ -26,9 +22,6 @@ func NewPeriod(startDate, endDate time.Time, boundaryType string) Period {
}

func NewDefaultPeriod(startDate, endDate time.Time) Period {
if startDate.After(endDate) {
startDate, endDate = endDate, startDate
}
return Period{
startDate: startDate,
endDate: endDate,
Expand All @@ -37,9 +30,6 @@ func NewDefaultPeriod(startDate, endDate time.Time) Period {
}

func NewIncludeAllPeriod(startDate, endDate time.Time) Period {
if startDate.After(endDate) {
startDate, endDate = endDate, startDate
}
return Period{
startDate: startDate,
endDate: endDate,
Expand Down
Loading