Skip to content
A Go library for Checkiday.com, the world's most complete holiday listing website
Go
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.
example
LICENSE
README.md
checkiday.go
checkiday_test.go
go.mod
go.sum

README.md

Checkiday

Godoc GoCenter

Checkiday.com is the world's most complete holiday listing website. There are at least 4300 unique holidays on the site that checkiday has verified for authenticity. This Go package, not endorsed by checkiday.com, serves as a simple wrapper on their API so that you can use their awesome data in your awesome app.

Usage

Get today's holidays

import "github.com/retgits/checkiday"

days, err := checkiday.Today()
if err != nil {
    fmt.Printf("Oh noes, an error occured: %s", err.Error())
}

for idx := range days.Holidays {
    fmt.Printf("Today is %s\n", days.Holidays[idx].Name)
}

Get the holidays of a specific date (must be formatted as mm/dd/yyyy)

import "github.com/retgits/checkiday"

days, err := checkiday.On("07/30/2018")
if err != nil {
    fmt.Printf("Oh noes, an error occured: %s", err.Error())
}

for idx := range days.Holidays {
    fmt.Printf("On 07/30/2018 we celebrated %s\n", days.Holidays[idx].Name)
}

July 30th is a special day, since we celebrate National Cheesecake Day

License

See the LICENSE file in the repository

Acknowledgements

A most sincere thanks to the team of Checkiday, for building such an awesome service that I enjoy every day!

This package is not endorsed by Checkiday.com

You can’t perform that action at this time.