gofindadate

package module
v0.0.0-...-b976bc5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2015 License: MIT Imports: 6 Imported by: 0

README

goFindADate

find a date embedded within a string and allow the strings to be sorted by it.

Find a date embedded within a string and allow the user to sort strings of this type chronologically

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidDateLength = errors.New("Invalid date length")
View Source
var InvalidDateString = errors.New("Invalid date string")
View Source
var NoInput = errors.New("No data for date")

Functions

func GetOldestOfSlice

func GetOldestOfSlice(slice []string) (oldest string)

Use the yeardate format to parse a string slice for the oldest, or the first malformed

Types

type StringWithDate

type StringWithDate string

type YearDate

type YearDate struct {
	// contains filtered or unexported fields
}

func GetDateWithYYYYMMDD

func GetDateWithYYYYMMDD(s string) (date *YearDate, err error)

Extract a slice of YYYY,MM,DD from the complied in regex pattern

func NewYearDate

func NewYearDate(f func(string) (*YearDate, error), s ...string) (date *YearDate, err error)

Construct a yeardate from either a string or a sequcence of YYYY,MM,DD

func (*YearDate) InvalidIsLess

func (this *YearDate) InvalidIsLess(that *YearDate) (less bool, ok bool)

The invalid dates float to Less

func (*YearDate) Less

func (this *YearDate) Less(that *YearDate) (less bool)

For sorting

Directories

Path Synopsis
Godeps
_workspace/src/github.com/cihub/seelog
Package seelog implements logging functionality with flexible dispatching, filtering, and formatting.
Package seelog implements logging functionality with flexible dispatching, filtering, and formatting.
_workspace/src/github.com/jtolds/gls
Package gls implements goroutine-local storage.
Package gls implements goroutine-local storage.
_workspace/src/github.com/smartystreets/goconvey/convey
Package convey contains all of the public-facing entry points to this project.
Package convey contains all of the public-facing entry points to this project.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions
Package assertions contains the implementations for all assertions which are referenced in the convey package for use with the So(...) method.
Package assertions contains the implementations for all assertions which are referenced in the convey package for use with the So(...) method.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers
Package oglematchers provides a set of matchers useful in a testing or mocking framework.
Package oglematchers provides a set of matchers useful in a testing or mocking framework.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglemock/createmock
createmock is used to generate source code for mock versions of interfaces from installed packages.
createmock is used to generate source code for mock versions of interfaces from installed packages.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglemock/generate
Package generate implements code generation for mock classes.
Package generate implements code generation for mock classes.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglemock/generate/test_cases/complicated_pkg
Package complicated_pkg contains an interface with lots of interesting cases, for use in integration testing.
Package complicated_pkg contains an interface with lots of interesting cases, for use in integration testing.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglemock/generate/test_cases/renamed_pkg
A package that calls itself something different than its package path would have you believe.
A package that calls itself something different than its package path would have you believe.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/ogletest
Package ogletest provides a framework for writing expressive unit tests.
Package ogletest provides a framework for writing expressive unit tests.
_workspace/src/github.com/smartystreets/goconvey/convey/gotest
Package gotest contains internal functionality.
Package gotest contains internal functionality.
_workspace/src/github.com/smartystreets/goconvey/convey/reporting
Package reporting contains internal functionality related to console reporting and output.
Package reporting contains internal functionality related to console reporting and output.

Jump to

Keyboard shortcuts

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