push
github
226 of 502 new or added lines in 15 files covered. (45.02%)
88 existing lines in 3 files now uncovered.8681 of 19744 relevant lines covered (43.97%)
0.5 hits per line
1 |
package template
|
|
2 |
|
|
3 |
import "time" |
|
4 |
|
|
|
func hour() int { |
1✔ |
|
return time.Now().Hour()
|
1✔ |
|
} |
1✔ |
8 |
|
|
|
func minute() int { |
1✔ |
|
return time.Now().Minute()
|
1✔ |
|
} |
1✔ |
12 |
|
|
|
func second() int { |
1✔ |
|
return time.Now().Second()
|
1✔ |
|
} |
1✔ |
16 |
|
|
|
func month() int { |
1✔ |
|
return int(time.Now().Month()) |
1✔ |
|
} |
1✔ |
20 |
|
|
|
func year() int { |
1✔ |
|
return time.Now().Year()
|
1✔ |
|
} |
1✔ |
24 |
|
|
|
func day() int { |
1✔ |
|
return time.Now().Day()
|
1✔ |
|
} |
1✔ |
28 |
|
|
|
func yearday() int { |
1✔ |
|
return time.Now().YearDay()
|
1✔ |
|
} |
1✔ |
32 |
|
|
|
func weekday() int { |
1✔ |
|
// 星期天返回0,手动改成7
|
1✔ |
|
t := time.Now().Weekday() |
1✔ |
|
if t == 0 { |
1✔ |
NEW
|
t = 7
|
× |
NEW
|
} |
× |
|
return int(t) |
1✔ |
40 |
} |