date

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2016 License: Apache-2.0 Imports: 1 Imported by: 3

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL