Skip to content

Commit

Permalink
Remove holidays slice length
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdannbv committed Feb 6, 2024
1 parent bb4866e commit 72f2d5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ func main() {
}
}

func getHolidays(year int) ([15]Holiday, error) {
func getHolidays(year int) ([]Holiday, error) {
orthodoxEaster, err := eastertime.OrthodoxByYear(year)
if err != nil {
return [15]Holiday{}, errors.New("the year must be greater than 325")
return []Holiday{}, errors.New("the year must be greater than 325")
}

easter := carbon.CreateFromStdTime(orthodoxEaster)
Expand All @@ -62,7 +62,7 @@ func getHolidays(year int) ([15]Holiday, error) {
whitMonday := easter.AddDays(50)
whitSunday := whitMonday.SubDay()

holidays := [15]Holiday{
holidays := []Holiday{
{
Name: "Anul nou",
Date: carbon.CreateFromDate(year, 1, 1).ToDateString(),
Expand Down

0 comments on commit 72f2d5c

Please # to comment.