Skip to content
Package month provides functionality pertaining to months of the year, encapsulating some of the more verbose features of underlying Go packages
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.codeclimate.yml
.gitattributes
.gitignore
.travis.yml
README.md
license
month.go
month_test.go

README.md

Image of insidethecpu

Go Month Package

Join the chat at https://gitter.im/daishisystems/month Build Status godoc

Package month provides functionality pertaining to months of the year. The package is designed with developer productivity in mind, encapsulating some of the more verbose features of underlying Go packages, and exposing them intuitively. Examples of this include the ability to return the last day of any given month.

Month Icon

Installation

go get github.com/daishisystems/month

Sample Code

	// The last numeric day of January is 31
	m := month.January
	fmt.Printf("The last numeric day of %s is %d\n", m, m.LastDay(2015))

	// The last numeric day of February is 28
	m = month.February
	fmt.Printf("The last numeric day of %s is %d\n", m, month.February.LastDay(2015))

	// The last numeric day of February is 29
	m = month.February
	fmt.Printf("The last numeric day of %s is %d\n", m, m.LastDay(2008))

	// The last numeric day of July is 31
	m = month.July
	fmt.Printf("The last numeric day of %s is %d\n", m, m.LastDay(2015))

Contact the Developer

Please reach out and contact me for questions, suggestions, or to just talk tech in general.

RSSTwitterLinkedInGoogle+YouTube

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.