Skip to content

retgits/checkiday

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

A Go library for Checkiday.com, the world's most complete holiday listing website

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages