Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 434 Bytes

03.7.3.md

File metadata and controls

5 lines (3 loc) · 434 Bytes

解析日期

在本节中你将学习如何将字符串转为日期,同样是使用time.Parse()

Go解析日期的常量是:Jan用来解析月份(英文月份简写),2006用来解析年,02用来解析天,Mon用来解析周几(如果是Monday,那就是周几的英文全称),同样如果你使用January而不是Jan,你将会得到月份的英文全称而不是三个字母的简写。