An extension of the go standard library time package which provides a number of convenience functions for retrieving new times based on the provided reference time.
Download and install the package
go get github.com/stephanbaker/go-simpletime
This package provides the following functions:
- NewSimpleTime
- BeginningOfYear
- BeginningOfMonth
- BeginningOfDay
- BeginningOfHour
- BeginningOfMinute
- BeginningOfSecond
- EndOfYear
- EndOfMonth
- EndOfDay
- EndOfHour
- EndOfMinute
- EndOfSecond
- NextOccurrenceOfWeekday
- NextSunday
- NextMonday
- NextTuesday
- NextWednesday
- NextThursday
- NextFriday
- NextSaturday
- AddDays
- NextDay
- PrevDay