package
0.0.0-20151215094434-9aa9c3bf18f3
Repository: https://github.com/itshosted/mcore.git
Documentation: pkg.go.dev

# README

Dates pattern lib

Simple date 'pattern' parser that extends time.ParseDuration with additional units d, M, y.

import (
	"github.com/xsnews/mcore/dates"
)

base := time.Date(2005, 1, 1, 0, 0, 0, 0, time.UTC)
out, e := ParseDuration("-1y5d6h", base)
if e != nil {
	panic(e)
}
fmt.Println(out.String())
// 2003-12-26 18:00:00 +0000 UTC

Patterns

y - year
M - month
d - day
h - hour
m - minute
s - second

# Functions

Determine future days in same month from given date.
No description provided by the author
Extended time.ParseDuration Additional supported units ['d', 'm', 'y'].

# Constants

No description provided by the author