多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
``` now := time.Now() //now = 2019-04-04 12:59:29.2675389 +0800 CST m=+0.007996801 now_type = time.Time fmt.Printf("now = %v now_type = %T \n", now, now) fmt.Printf("年=%v \n", now.Year()) fmt.Printf("月=%v \n", now.Month()) fmt.Printf("月=%v \n", int(now.Month())) fmt.Printf("日=%v \n", now.Day()) fmt.Printf("时=%v \n", now.Hour()) fmt.Printf("分=%v \n", now.Minute()) fmt.Printf("秒=%v \n", now.Second()) fmt.Printf(now.Format("2006-02-02 15:04:05")) fmt.Println() fmt.Printf(now.Format("2006-02-02")) fmt.Println() fmt.Printf(now.Format("15:04:05")) ``` ``` ```