iso8601

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2015 License: MIT Imports: 5 Imported by: 23

README

iso 8601 parser and formatter

An ISO8601 Go utility.

  • Time is not yet implemented
  • Duration is mostly implemented

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBadFormat is returned when parsing fails
	ErrBadFormat = errors.New("bad format string")

	// ErrNoMonth is raised when a month is in the format string
	ErrNoMonth = errors.New("no months allowed")
)

Functions

func FormatDuration

func FormatDuration(duration time.Duration) string

func ParseDuration

func ParseDuration(value string) (time.Duration, error)

adapted from https://github.com/BrianHicks/finch/duration

Types

This section is empty.

Jump to

Keyboard shortcuts

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