Skip to content

daishisystems/month

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Package month provides functionality pertaining to months of the year, encapsulating some of the more verbose features of underlying Go packages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages