@@ -125,11 +125,11 @@ func TestHtmlTimeSince(t *testing.T) {
125125 }
126126 test ("1 second" , time .Second )
127127 test ("3 minutes" , 3 * time .Minute + 5 * time .Second )
128- test ("1 day" , DayDur + 18 * time .Hour )
129- test ("1 week" , WeekDur + 6 * DayDur )
130- test ("3 months" , 3 * MonthDur + 3 * WeekDur )
128+ test ("1 day" , DayDur + 11 * time .Hour )
129+ test ("1 week" , WeekDur + 3 * DayDur )
130+ test ("3 months" , 3 * MonthDur + 2 * WeekDur )
131131 test ("2 years" , 2 * YearDur )
132- test ("3 years" , 3 * YearDur + 11 * MonthDur + 4 * WeekDur )
132+ test ("3 years" , 2 * YearDur + 11 * MonthDur + 4 * WeekDur )
133133}
134134
135135func TestComputeTimeDiff (t * testing.T ) {
@@ -163,9 +163,9 @@ func TestComputeTimeDiff(t *testing.T) {
163163 test (Month , "1 month" , 0 , 1 )
164164 test (Month , "2 months" , 16 * Day , Month - 1 )
165165 test (10 * Month , "10 months" , 0 , 13 * Day )
166- test (Year , "1 year" , 0 , 182 * Day )
167- test (Year , "2 years" , 184 * Day , Year - 1 )
168- test (3 * Year , "3 years" , 0 , 182 * Day )
166+ test (Year , "1 year" , 0 , 179 * Day )
167+ test (Year , "2 years" , 180 * Day , Year - 1 )
168+ test (3 * Year , "3 years" , 0 , 179 * Day )
169169}
170170
171171func TestMinutesToFriendly (t * testing.T ) {
0 commit comments