HolidaysRequest
public class HolidaysRequest : RequestObject
HolidaysRequest
See also
holidays – Retrieve List of Holidays holidayRequest = HolidaysRequest()
holidayRequest.country = "no"
holidayRequest.year = 2020
-
Specify the country for which you would like to retrieve the list of holidays. A states ISO code can also be used when applicable (see a countrys state support on Holidays by Country) - The additional code fun can be used to retrieve fun holidays. - The additional code all can be used to retrieve holidays for all countries. When you use all the cost of the request will be the number of countries returned, instead of 1.
Declaration
Swift
public var country: String!
-
The year for which the holidays should be retrieved.
Declaration
Swift
public var year: Int!
-
The preferred language(s) for the texts. An error will be raised if the language code cannot be recognized. In case the text for a specific event cannot be retrieved in any of the requested languages it will be returned in English instead. To query for multiple languages, specify them as comma separated list or repeat the parameter multiple times. In case a requested translation is not available, it will be omitted from the output.
It is possible to query all available languages in a single request by specifying a primary text language, followed by the special value all. This value can not be specified as the first language. - In case you have specific needs for a certain language/translation, please email api@timeanddate.com.
Declaration
Swift
public var lang: String
-
Holiday types which should be returned. To combine multiple types, either separate them with commas or repeat the parameter with a different value. A negation can be expressed by prefixing the value with a tilde (~) character. Values are combined in the order they are supplied.
When the country parameter is a states ISO code then this parameter must include countrydefault to get valid result since the default value does not include local/state holidays
Declaration
Swift
public var includeTypes: [HolidayTypes]?
-
Add time zone information under the date object.
Declaration
Swift
public var tz: Bool
-
AAdds verbose time specification to all ISO 8601 time stamps.
Declaration
Swift
public var verbosetime: Bool