Go语言:谁能告诉我为什么这段代码是这样的结果?
package main
import (
"fmt"
"time"
)
func main() {
now := time.Now()
fmt.Printf("now=%v\n", now)
year, month, day := now.Date()
fmt.Printf("年:%v,月:%v,日:%v\n", year, month, day)
fmt.Printf("年:%v\n", now.Year())
fmt.Printf("月:%v\n", now.Day())
fmt.Printf("日:%v\n", now.Month())
fmt.Printf("时:%v\n", now.Hour())
fmt.Printf("分:%v\n", now.Minute())
fmt.Printf("秒:%v\n", now.Second())
fmt.Println(now.Format(time.DateTime))
for i := 1; i <= 5; i++ {
fmt.Printf("i=%v\n", i)
time.Sleep(time.Millisecond * 100)
}
}