Documentation ¶
Index ¶
- Constants
- func EndOfDay(t time.Time) time.Time
- func Format(t time.Time) string
- func FormatJson(t time.Time) string
- func Match(layout, format string) bool
- func MatchTime(layout, format string, t time.Time) bool
- func ParseDate(date string) (t time.Time)
- func ParseRFC1123(date string) (t time.Time)
- func StartOfDay(t time.Time) time.Time
- func YMD(t time.Time) string
- type DateRange
Constants ¶
View Source
const ( RFC1123_1 = "Mon, _2 Jan 2006 15:04:05 MST" RFC1123_2 = "Mon, 2 Jan 2006 15:04:05 MST" RFC1123Z_1 = "Mon, _2 Jan 2006 15:04:05 -0700" RFC1123Z_2 = "Mon, 2 Jan 2006 15:04:05 -0700" )
View Source
const ( Simple12 = "Jan 02 03:04 PM" Simple24 = "Jan 02 15:04" )
Variables ¶
This section is empty.
Functions ¶
func FormatJson ¶
func Match ¶
Format the current time with the given layout and return whether or not it matches the provided format.
func MatchTime ¶
Format the given time with layout and return whether or not it matches the provided format.
func ParseRFC1123 ¶
Mon, 02 Jan 2006 15:04:05 MST Tue, 07 Dec 2021 19:57:22 -0500 Fri, 6 Nov 2020 19:32:35 +0000
Types ¶
type DateRange ¶
type DateRange struct {
// contains filtered or unexported fields
}
func NewDateRange ¶
func (*DateRange) BeforeDate ¶
Click to show internal directories.
Click to hide internal directories.