time

package
v2.8.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrParseNotPossible = errors.New("No layout matched given value or other error occurred")

ErrParseNotPossible describes a collected error which is returned when the given date value could not be parsed with any given layout

Functions

func MultiParse

func MultiParse(layouts []string, value string) (gotime.Time, error)

MultiParse takes multiple layout strings and tries to parse the value with them. In case none of the layouts matches or another error occurs ErrParseNotPossible is returned

func MultiParseInLocation

func MultiParseInLocation(layouts []string, value string, loc *gotime.Location) (gotime.Time, error)

MultiParseInLocation takes multiple layouts and tries to parse the value with them using time.ParseInLocation. In case none of the layouts matches or another error occurs ErrParseNotPossible is returned

Types

This section is empty.

Jump to

Keyboard shortcuts

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