fix(calendar): bad compute for paques monday
This commit is contained in:
		@@ -50,7 +50,7 @@ func (cal *Calendar) GetHolidays(year int) *[]time.Time {
 | 
			
		||||
		// Jour de l'an
 | 
			
		||||
		time.Date(year, time.January, 1, 0, 0, 0, 0, cal.Location),
 | 
			
		||||
		// Easter
 | 
			
		||||
		paques,
 | 
			
		||||
		paques.AddDate(0, 0, 1),
 | 
			
		||||
		// 1 mai
 | 
			
		||||
		time.Date(year, time.May, 1, 0, 0, 0, 0, cal.Location),
 | 
			
		||||
		// 8 mai
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,7 @@ func TestCalendar_GetEasterDay(t *testing.T) {
 | 
			
		||||
		time.Date(2021, time.April, 4, 0, 0, 0, 0, loc),
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	c := Calendar{loc}
 | 
			
		||||
	c := New(loc)
 | 
			
		||||
 | 
			
		||||
	for _, d := range easterDays {
 | 
			
		||||
		easter := c.GetEasterDay(d.Year())
 | 
			
		||||
@@ -37,7 +37,7 @@ func TestCalendar_GetHolidays(t *testing.T) {
 | 
			
		||||
 | 
			
		||||
	expectedHolidays := map[time.Time]bool{
 | 
			
		||||
		time.Date(2020, time.January, 1, 0, 0, 0, 0, loc):   true,
 | 
			
		||||
		time.Date(2020, time.April, 12, 0, 0, 0, 0, loc):    true,
 | 
			
		||||
		time.Date(2020, time.April, 13, 0, 0, 0, 0, loc):    true,
 | 
			
		||||
		time.Date(2020, time.May, 1, 0, 0, 0, 0, loc):       true,
 | 
			
		||||
		time.Date(2020, time.May, 8, 0, 0, 0, 0, loc):       true,
 | 
			
		||||
		time.Date(2020, time.May, 21, 0, 0, 0, 0, loc):      true,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user