mirror of
https://gitee.com/dromara/carbon.git
synced 2024-11-30 03:07:36 +08:00
更新版本号,新增时间格式化常量
This commit is contained in:
parent
2ceb1ef5ec
commit
72a181795b
57
carbon.go
57
carbon.go
@ -97,7 +97,7 @@ const (
|
||||
YearsPerMillennium = 1000 // 每千年1000年
|
||||
YearsPerCentury = 100 // 每世纪100年
|
||||
YearsPerDecade = 10 // 每十年10年
|
||||
QuartersPerYear = 4 // 每年4季度
|
||||
QuartersPerYear = 4 // 每年4个季度
|
||||
MonthsPerYear = 12 // 每年12月
|
||||
MonthsPerQuarter = 3 // 每季度3月
|
||||
WeeksPerNormalYear = 52 // 每常规年52周
|
||||
@ -122,29 +122,38 @@ const (
|
||||
// formats constant
|
||||
// 时间格式化常量
|
||||
const (
|
||||
AnsicFormat = time.ANSIC
|
||||
UnixDateFormat = time.UnixDate
|
||||
RubyDateFormat = time.RubyDate
|
||||
RFC822Format = time.RFC822
|
||||
RFC822ZFormat = time.RFC822Z
|
||||
RFC850Format = time.RFC850
|
||||
RFC1123Format = time.RFC1123
|
||||
RFC1123ZFormat = time.RFC1123Z
|
||||
RssFormat = time.RFC1123Z
|
||||
RFC2822Format = time.RFC1123Z
|
||||
RFC3339Format = time.RFC3339
|
||||
KitchenFormat = time.Kitchen
|
||||
CookieFormat = "Monday, 02-Jan-2006 15:04:05 MST"
|
||||
ISO8601Format = "2006-01-02T15:04:05-07:00"
|
||||
RFC1036Format = "Mon, 02 Jan 06 15:04:05 -0700"
|
||||
RFC7231Format = "Mon, 02 Jan 2006 15:04:05 GMT"
|
||||
DayDateTimeFormat = "Mon, Jan 2, 2006 3:04 PM"
|
||||
DateTimeFormat = "2006-01-02 15:04:05"
|
||||
DateFormat = "2006-01-02"
|
||||
TimeFormat = "15:04:05"
|
||||
ShortDateTimeFormat = "20060102150405"
|
||||
ShortDateFormat = "20060102"
|
||||
ShortTimeFormat = "150405"
|
||||
AnsicFormat = time.ANSIC
|
||||
UnixDateFormat = time.UnixDate
|
||||
RubyDateFormat = time.RubyDate
|
||||
RFC822Format = time.RFC822
|
||||
RFC822ZFormat = time.RFC822Z
|
||||
RFC850Format = time.RFC850
|
||||
RFC1123Format = time.RFC1123
|
||||
RFC1123ZFormat = time.RFC1123Z
|
||||
RssFormat = time.RFC1123Z
|
||||
KitchenFormat = time.Kitchen
|
||||
RFC2822Format = time.RFC1123Z
|
||||
RFC3339Format = "2006-01-02T15:04:05Z07:00"
|
||||
RFC3339MilliFormat = "2006-01-02T15:04:05.999Z07:00"
|
||||
RFC3339MicroFormat = "2006-01-02T15:04:05.999999Z07:00"
|
||||
RFC3339NanoFormat = "2006-01-02T15:04:05.999999999Z07:00"
|
||||
CookieFormat = "Monday, 02-Jan-2006 15:04:05 MST"
|
||||
ISO8601Format = "2006-01-02T15:04:05-07:00"
|
||||
RFC1036Format = "Mon, 02 Jan 06 15:04:05 -0700"
|
||||
RFC7231Format = "Mon, 02 Jan 2006 15:04:05 GMT"
|
||||
DayDateTimeFormat = "Mon, Jan 2, 2006 3:04 PM"
|
||||
DateTimeFormat = "2006-01-02 15:04:05"
|
||||
DateTimeMilliFormat = "2006-01-02 15:04:05.999"
|
||||
DateTimeMicroFormat = "2006-01-02 15:04:05.999999"
|
||||
DateTimeNanoFormat = "2006-01-02 15:04:05.999999999"
|
||||
DateFormat = "2006-01-02"
|
||||
TimeFormat = "15:04:05"
|
||||
ShortDateTimeFormat = "20060102150405"
|
||||
ShortDateTimeMilliFormat = "20060102150405.999"
|
||||
ShortDateTimeMicroFormat = "20060102150405.999999"
|
||||
ShortDateTimeNanoFormat = "20060102150405.999999999"
|
||||
ShortDateFormat = "20060102"
|
||||
ShortTimeFormat = "150405"
|
||||
)
|
||||
|
||||
// Carbon defines a Carbon struct.
|
||||
|
Loading…
Reference in New Issue
Block a user