Crate holidays

source ·

Modules

United Arab Emirates.
Armenia.
Angola.
Argentina.
Austria.
Australia.
Aruba.
Azerbaijan.
Bosnia and Herzegovina.
Bangladesh.
Belgium.
Bulgaria.
Burundi.
Bolivia.
Brazil.
Botswana.
Belarus.
Canada.
Switzerland.
Chile.
China.
Colombia.
Cuba.
Curaçao.
Cyprus.
Czechia.
Germany.
Djibouti.
Denmark.
Dominican Republic.
Estonia.
Egypt.
Spain.
Ethiopia.
Finland.
France.
United Kingdom.
Georgia.
Greece.
Hong Kong.
Honduras.
Croatia.
Hungary.
Indonesia.
Ireland.
Israel.
Isle of Man.
India.
Iceland.
Italy.
Jamaica.
Japan.
Kenya.
South Korea.
Kazakhstan.
Liechtenstein.
Lesotho.
Lithuania.
Luxembourg.
Latvia.
Morocco.
Moldova.
Madagascar.
North Macedonia.
Malta.
Malawi.
Mexico.
Malaysia.
Mozambique.
Namibia.
Nigeria.
Nicaragua.
Netherlands.
Norway.
New Zealand.
Peru.
Pakistan.
Poland.
Portugal.
Paraguay.
Romania.
Serbia.
Russia.
Saudi Arabia.
Sweden.
Singapore.
Slovenia.
Slovakia.
Swaziland.
Tunisia.
Turkey.
Taiwan.
Ukraine.
United States.
Uruguay.
Uzbekistan.
Venezuela.
Vietnam.
South Africa.
Zambia.
Zimbabwe.

Structs

Holiday database builder.
Represents a holiday.

Enums

Two-letter country codes defined in ISO 3166-1 alpha-2 .
Error type of this crate.

Functions

Check if the specified date is a holiday. If the specified country or year is not available, it will return Err(Error). If the date is not a holiday, it will return Ok(false). Otherwise, it will return Ok(true).
Get holiday by ISO 3166-1 alpha-2 country code and date. If the specified country or year is not available, it will return Err(Error). If the specified date is not a holiday, it will return Ok(None). Otherwise, it will return Ok(Some(Holiday)).
Initialize holiday database for all the supported countries and years. Note that this will use quite lots of memory. Please consider using Builder to specify countries and years to load for if you’re concerned about memory usage.
Iterate holidays by dates.

Type Definitions

Type alias for Holiday map.
Result type of this crate.
Type alias for Year.