botholiday
is a Go package designed to help check the holidays of the Bank of Thailand.
go get github.com/oddsteam/bot-holiday
You can register and obtain a ClientID from Here.
import (
"github.com/oddsteam/bot-holiday/pkg/botholiday"
)
botholiday.Initialize("ClientID")
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.
}
MIT