Documentation
¶
Index ¶
Constants ¶
const ( TimeDay = 24 * time.Hour TimeMonth = 30 * TimeDay TimeYear = 365 * TimeDay )
time values for missing time values
Variables ¶
This section is empty.
Functions ¶
func Format ¶ added in v1.3.0
Format returns a string representing the duration in the ISO 8601 format, but only with the hours being the highest time element, e.g. "PT44H7M3.15s". Leading zero units are omitted. The result counts as a valid ISO8601 duration. It supports negative durations, as detailed in the extension ISO 8601-2.
func FormatQuick ¶ added in v1.1.0
FormatQuick Deprecated: use FormatSeconds instead.
func FormatSeconds ¶ added in v1.2.0
FormatSeconds returns a string representing the duration in the ISO8601 format, but only in seconds, e.g. "PT345.15s". Leading zero units are omitted. The result counts as a valid ISO8601 duration. It supports negative durations, as detailed in the extension ISO8601-2. Deprecated: it is not significantly faster than Format, so it will be replaced by it later.
Types ¶
This section is empty.