Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 718 Bytes

README.md

File metadata and controls

34 lines (27 loc) · 718 Bytes

fuzzytime

Build Status

A date/time parsing package for Go.

Documentation: GoDoc

Example:

func ExampleExtract() {

inputs := []string{
"Wed Apr 16 17:32:51 NZST 2014",
"2010-02-01T13:14:43Z", // an iso 8601 form
"no date or time info here",
"Published on March 10th, 1999 by Brian Credability",
"2:51pm",
}

for _, inp := range inputs {
dt := Extract(inp)
fmt.Println(dt.ISOFormat())
}

// Output:
// 2014-04-16T17:32:51+12:00
// 2010-02-01T13:14:43Z
//
// 1999-03-10
// T14:51
}