Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 984 Bytes

README.md

File metadata and controls

56 lines (38 loc) · 984 Bytes

botholiday

botholiday is a Go package designed to help check the holidays of the Bank of Thailand.

Install

go get github.com/oddsteam/bot-holiday

Usage

You can register and obtain a ClientID from Here.

import (
    "github.com/oddsteam/bot-holiday/pkg/botholiday"
)

botholiday.Initialize("ClientID")

Example

Get all holidays of the Bank of Thailand in this year.

import (
    "github.com/oddsteam/bot-holiday/pkg/botholiday"
)

inst := botholiday.Initialize("Client ID.")
inst.GetBOTHoliday()

Check if today is a holiday of the Bank of Thailand for this year or not.

import (
    "time"
    "github.com/oddsteam/bot-holiday/pkg/botholiday"
)

inst := botholiday.Initialize("Client ID.")
if botholiday.CheckHoliday(inst.GetBOTHoliday(), time.Now()) {
    // Do something if today is a holiday.
}

Maintainer

ODDS

License

MIT