Documentation ¶
Index ¶
- func FormatDateTime(value time.Time) string
- func FormatEpochSeconds(value time.Time) float64
- func FormatHTTPDate(value time.Time) string
- func ParseDateTime(value string) (time.Time, error)
- func ParseEpochSeconds(value float64) time.Time
- func ParseHTTPDate(value string) (time.Time, error)
- func SleepWithContext(ctx context.Context, dur time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDateTime ¶
FormatDateTime formats value as a date-time, (RFC3339 section 5.6)
Example: 1985-04-12T23:20:50.52Z
func FormatEpochSeconds ¶
FormatEpochSeconds returns value as a Unix time in seconds with with decimal precision
Example: 1515531081.123
func FormatHTTPDate ¶
FormatHTTPDate formats value as a http-date, (RFC 7231#section-7.1.1.1 IMF-fixdate)
Example: Tue, 29 Apr 2014 18:30:38 GMT
func ParseDateTime ¶
ParseDateTime parses a string as a date-time, (RFC3339 section 5.6)
Example: 1985-04-12T23:20:50.52Z
func ParseEpochSeconds ¶
ParseEpochSeconds returns value as a Unix time in seconds with with decimal precision
Example: 1515531081.123
func ParseHTTPDate ¶
ParseHTTPDate parses a string as a http-date, (RFC 7231#section-7.1.1.1 IMF-fixdate)
Example: Tue, 29 Apr 2014 18:30:38 GMT
Types ¶
This section is empty.