@@ -125,11 +125,11 @@ func TestHtmlTimeSince(t *testing.T) {
125
125
}
126
126
test ("1 second" , time .Second )
127
127
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 )
131
131
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 )
133
133
}
134
134
135
135
func TestComputeTimeDiff (t * testing.T ) {
@@ -163,9 +163,9 @@ func TestComputeTimeDiff(t *testing.T) {
163
163
test (Month , "1 month" , 0 , 1 )
164
164
test (Month , "2 months" , 16 * Day , Month - 1 )
165
165
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 )
169
169
}
170
170
171
171
func TestMinutesToFriendly (t * testing.T ) {
0 commit comments