An open API service indexing awesome lists of open source software.

https://github.com/jonelo/xml-holidays

Expresses international holiday definitions using XML, it provides 1100+ definitions from 35+ countries/regions
https://github.com/jonelo/xml-holidays

countries country-information holiday holidays xml xml-holidays

Last synced: 2 months ago
JSON representation

Expresses international holiday definitions using XML, it provides 1100+ definitions from 35+ countries/regions

Awesome Lists containing this project

README

        

# XML Holidays

## Description

### What the project is for

The xml-holidays project suggests an XML document type for expressing international holidays.
The project also supports both current and historic holiday definitions for many countries actually.

### What is out of the scope of this project?

This project concentrates on a holiday xml standard and the actual data definitions for holidays on this planet.
This suggested standard should be independent of any programming language.
Therefore an actual software implementation that parses xml data is out of the scope of this project.

### Are there actual implementations that can process xml holidays data?

The free project called NumericalChameleon (a FOSS unit converter written in Java, released under the terms of the GPL)
is able to read and understand xml holidays data. See also http://numericalchameleon.net

## Examples

### Celebrated on a fixed day

#### Example: on January 1
In many countries the New Year's day is always celebrated on January 1, each year.

```xml




```

### Celebrated on a date that is dependent on Easter

#### Example: two days before Easter Sunday

Easter is celebrated always on a Sunday. Good Friday is celebrated two days before Easter.
Simply use the easter tag at first and subtract two days from it (add -2).

```xml





```

### Celebrated on the nth weekday in a particular month

#### Example: on the second Sunday in May

In the USA, Mother's Day is celebrated on the second Sunday in May.
The holiday was declared officially by some states beginning in 1912.

```xml



```

### Celebrated on a date that is dependent on a weekday

#### Example: on October 12 with dependencies on a weekday

In Argentina Columbus Day (Día de la Raza) is celebrated on October 12, but if the date falls on a Tuesday or Wednesday,
the holiday is the preceding Monday. If it falls on a Thursday or on a Friday then the holiday is the following Monday.

```xml


















```

### Celebrated on the nth weekday in a particular month and on a fixed day in the past

#### Example: on the third Monday in February and on February 22 until 1970

As the first federal holiday to honor an American citizen, Washington's Birthday was celebrated on Washington's
actual birthday, February 22. In 1971 it was shifted to the third Monday in February.
So actually you need two definition blocks in order to define the Washington's birthday holiday correctly.

```xml








```

### Celebrated on a particular weekday of the nth full week of a particular month

#### Example: on the Tuesday of the first full week of May

Since 1986 the National Teacher Day is celebrated on Tuesday of the first full week of May.
In the US, the week begins with Sunday, therefore the first full week begins with the first Sunday in May.
If you add two days, you get Tuesday.

```xml





```

#### Example: on the Wednesday of the last full week of April

The National Secretaries Day is observed on the Wednesday of the last full week of April.
In the US, the week begins with Sunday and it ends with Saturday.
The last full week is therefore the week which ends with Saturday (the last Saturday in April).
In order to get the Wednesday of the last full week of April, simply subtract three days.

```xml





```

### Celebrated on a particular weekday nearest a particular date

#### Example: on Monday nearest July 1st

In the Canadian provinces Newfoundland and Labrador, the Memorial Day is observed on the Monday nearest July 1st.
Set the fixed date (July 1) and use the goto-direction called "nearest". The definition:

```xml





```

### Celebrated in a different calendar system

#### Example: Hebrew Calendar: Fast of Esther in Israel

In Israel the Fast of Esther is observed on the 13th day of the Hebrew month of Adar. So we need to specify
the hebrew calendar for the definition.

```xml













```

### Seasons: a day dependent on Solstice or Equinox

#### Example: the Solstice in June in Germany

In June 2008 the Solstice was on June 20 at 23:59 UTC (24 h system). This was the begin of summer for people living
in the northern hemisphere and it was the start of winter for people living in the southern hemisphere.
In Germany's caldendars, you find June 21, 2008 for the Solstice.
This is because of the timezone difference of 2 hours from UTC.
For the Europe/Berlin timezone the actual Solstice was on June 21, 2008 at 1:59 (24 h system).
As the actual day of the Solstice (or Equinox) is dependent on the timezone in a country,
you can specify it with the parameter called timezone.

```xml




```