Documentation ¶
Overview ¶
Package date provides functions for parsing and formatting dates according the requirements of Toggl (ISO 8601).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
type Formatter interface { // GetDateString returns a formatted date string for the given date. GetDateString(date time.Time) string // GetDate returns a time.Time model for a given date string. // Returns and error if the date could not be parsed. GetDate(date string) (time.Time, error) }
A Formatter interface provides functions for parsing and formatting dates.
func NewISO8601Formatter ¶
func NewISO8601Formatter() Formatter
NewISO8601Formatter creates a new ISO 8601 date formatter.
Click to show internal directories.
Click to hide internal directories.