Crate holidays

Source

Modules§

ae
United Arab Emirates.
am
Armenia.
ao
Angola.
ar
Argentina.
at
Austria.
au
Australia.
aw
Aruba.
az
Azerbaijan.
ba
Bosnia and Herzegovina.
bd
Bangladesh.
be
Belgium.
bg
Bulgaria.
bi
Burundi.
bo
Bolivia.
br
Brazil.
bw
Botswana.
by
Belarus.
ca
Canada.
ch
Switzerland.
cl
Chile.
cn
China.
co
Colombia.
cu
Cuba.
cw
Curaçao.
cy
Cyprus.
cz
Czechia.
de
Germany.
dj
Djibouti.
dk
Denmark.
do
Dominican Republic.
ee
Estonia.
eg
Egypt.
es
Spain.
et
Ethiopia.
fi
Finland.
fr
France.
gb
United Kingdom.
ge
Georgia.
gr
Greece.
hk
Hong Kong.
hn
Honduras.
hr
Croatia.
hu
Hungary.
id
Indonesia.
ie
Ireland.
il
Israel.
im
Isle of Man.
in
India.
is
Iceland.
it
Italy.
jm
Jamaica.
jp
Japan.
ke
Kenya.
kr
South Korea.
kz
Kazakhstan.
li
Liechtenstein.
ls
Lesotho.
lt
Lithuania.
lu
Luxembourg.
lv
Latvia.
ma
Morocco.
md
Moldova.
mg
Madagascar.
mk
North Macedonia.
mt
Malta.
mw
Malawi.
mx
Mexico.
my
Malaysia.
mz
Mozambique.
na
Namibia.
ng
Nigeria.
ni
Nicaragua.
nl
Netherlands.
no
Norway.
nz
New Zealand.
pe
Peru.
pk
Pakistan.
pl
Poland.
pt
Portugal.
py
Paraguay.
ro
Romania.
rs
Serbia.
ru
Russia.
sa
Saudi Arabia.
se
Sweden.
sg
Singapore.
si
Slovenia.
sk
Slovakia.
sz
Swaziland.
tn
Tunisia.
tr
Turkey.
tw
Taiwan.
ua
Ukraine.
us
United States.
uy
Uruguay.
uz
Uzbekistan.
ve
Venezuela.
vn
Vietnam.
za
South Africa.
zm
Zambia.
zw
Zimbabwe.

Structs§

Builder
Holiday database builder.
Holiday
Represents a holiday.
Iter

Enums§

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

Functions§

contains
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
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)).
init
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.
iter
Iterate holidays by dates.

Type Aliases§

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