query/holiday

Holiday Query Functions

These functions query the rt_holidays table in the Right Track Database.

Source:

Methods

(inner) getHoliday(db, date, callback)

Source:

Get the Holiday for the specified date or 'undefined' if there is no holiday on the date

Parameters:
Name Type Description
db RightTrackDB

The Right Track DB to query

date int

the date (yyyymmdd)

callback function

Callback function

Properties
Name Type Attributes Description
error Error

Database Query Error

holiday Holiday <optional>

The selected Holiday

(inner) getHolidays(db, callback)

Source:

Get a list of Holidays that are stored in the specified database.

Parameters:
Name Type Description
db RightTrackDB

The Right Track DB to query

callback function

Callback function

Properties
Name Type Attributes Description
error Error

Database Query Error

holidays Array.<Holiday> <optional>

The selected Holidays

(inner) isHoliday(db, date, callback)

Source:

Check if the specified date is a Holiday

Parameters:
Name Type Description
db RightTrackDB

The Right Track DB to query

date int

The date to check (yyyymmdd)

callback function

Callback function

Properties
Name Type Attributes Description
error Error

Database Query Error

isHoliday boolean <optional>

True if the specified date is a Holiday