{"id":17688317,"url":"https://github.com/jonelo/xml-holidays","last_synced_at":"2026-01-07T19:51:27.627Z","repository":{"id":91746480,"uuid":"68456508","full_name":"jonelo/xml-holidays","owner":"jonelo","description":"Expresses international holiday definitions using XML, it provides 1100+ definitions from 35+ countries/regions","archived":false,"fork":false,"pushed_at":"2025-03-08T03:51:23.000Z","size":323,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T04:19:06.465Z","etag":null,"topics":["countries","country-information","holiday","holidays","xml","xml-holidays"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonelo.png","metadata":{"files":{"readme":"README.md","changelog":"history.txt","contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-17T14:18:03.000Z","updated_at":"2025-03-08T03:51:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"26ecb1b0-518c-4fda-9e35-283cd0b25d06","html_url":"https://github.com/jonelo/xml-holidays","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonelo%2Fxml-holidays","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonelo%2Fxml-holidays/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonelo%2Fxml-holidays/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonelo%2Fxml-holidays/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonelo","download_url":"https://codeload.github.com/jonelo/xml-holidays/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246383099,"owners_count":20768341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["countries","country-information","holiday","holidays","xml","xml-holidays"],"created_at":"2024-10-24T11:44:09.413Z","updated_at":"2026-01-07T19:51:27.597Z","avatar_url":"https://github.com/jonelo.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# XML Holidays\n\n## Description\n\n### What the project is for\n\nThe xml-holidays project suggests an XML document type for expressing international holidays.\nThe project also supports both current and historic holiday definitions for many countries actually.\n\n### What is out of the scope of this project?\n\nThis project concentrates on a holiday xml standard and the actual data definitions for holidays on this planet.\nThis suggested standard should be independent of any programming language.\nTherefore an actual software implementation that parses xml data is out of the scope of this project.\n\n### Are there actual implementations that can process xml holidays data?\n\nThe free project called NumericalChameleon (a FOSS unit converter written in Java, released under the terms of the GPL)\nis able to read and understand xml holidays data. See also http://numericalchameleon.net\n\n\n## Examples\n\n### Celebrated on a fixed day\n\n#### Example: on January 1\nIn many countries the New Year's day is always celebrated on January 1, each year.\n\n```xml\n\u003choliday\u003e\n    \u003cdescription language=\"en\" name=\"New Year's Day\"/\u003e\n    \u003cdescription language=\"de\" name=\"Neujahrstag\"/\u003e\n\n    \u003cdefinition\u003e\n        \u003cfixed day=\"1\" month=\"January\"/\u003e\n    \u003c/definition\u003e\n\u003c/holiday\u003e\n```\n\n\n### Celebrated on a date that is dependent on Easter\n\n#### Example: two days before Easter Sunday\n\nEaster is celebrated always on a Sunday. Good Friday is celebrated two days before Easter.\nSimply use the easter tag at first and subtract two days from it (add -2).\n\n```xml\n\u003choliday\u003e\n    \u003cdescription language=\"en\" name=\"Good Friday\"/\u003e\n    \u003cdescription language=\"de\" name=\"Karfreitag\"/\u003e\n\n    \u003cdefinition\u003e\n        \u003ceaster/\u003e\n        \u003cadd days=\"-2\"/\u003e\n    \u003c/definition\u003e\n\u003c/holiday\u003e\n```\n\n\n### Celebrated on the nth weekday in a particular month\n\n#### Example: on the second Sunday in May\n\nIn the USA, Mother's Day is celebrated on the second Sunday in May.\nThe holiday was declared officially by some states beginning in 1912.\n\n```xml\n\u003c!-- http://en.wikipedia.org/wiki/Mother%27s_Day --\u003e\n\u003choliday\u003e\n    \u003cdescription language=\"en\" name=\"Mother's Day\"/\u003e\n\n    \u003cdefinition firstyear=\"1912\"\u003e\n        \u003crule nth=\"2nd\" weekday=\"Sunday\" month=\"May\"/\u003e\n    \u003c/definition\u003e\n\u003c/holiday\u003e\n```\n\n\n### Celebrated on a date that is dependent on a weekday\n\n#### Example: on October 12 with dependencies on a weekday\n\nIn Argentina Columbus Day (Día de la Raza) is celebrated on October 12, but if the date falls on a Tuesday or Wednesday,\nthe holiday is the preceding Monday. If it falls on a Thursday or on a Friday then the holiday is the following Monday.\n\n```xml\n\u003choliday\u003e\n    \u003cdescription language=\"es\" name=\"Día de la Raza\" type=\"public holiday\"/\u003e\n    \u003cdescription language=\"en\" name=\"Columbus Day\" type=\"public holiday\"/\u003e\n\n    \u003cdefinition firstyear=\"1917\"\u003e\n        \u003cfixed day=\"12\" month=\"October\"/\u003e\n        \u003c!--\n          If the date falls on a Tuesday or Wednesday,\n          the holiday is the preceding Monday.\n        --\u003e\n        \u003ccondition ifweekday=\"Tuesday\"\u003e\n            \u003cadd days=\"-1\"/\u003e  \u003c!-- can become the preceding Monday --\u003e\n        \u003c/condition\u003e\n        \u003ccondition ifweekday=\"Wednesday\"\u003e\n            \u003cadd days=\"-2\"/\u003e  \u003c!-- can become the preceding Monday --\u003e\n        \u003c/condition\u003e\n        \u003c!--\n          If it falls on a Thursday or a Friday then\n          the holiday is the following Monday.\n        --\u003e\n        \u003ccondition ifweekday=\"Thursday\"\u003e\n            \u003cadd days=\"+4\"/\u003e  \u003c!-- can become the following Monday --\u003e\n        \u003c/condition\u003e\n        \u003ccondition ifweekday=\"Friday\"\u003e\n            \u003cadd days=\"+3\"/\u003e \u003c!-- can become the following Monday --\u003e\n        \u003c/condition\u003e\n    \u003c/definition\u003e\n\u003c/holiday\u003e\n```\n\n\n### Celebrated on the nth weekday in a particular month and on a fixed day in the past\n\n#### Example: on the third Monday in February and on February 22 until 1970\n\nAs the first federal holiday to honor an American citizen, Washington's Birthday was celebrated on Washington's\nactual birthday, February 22. In 1971 it was shifted to the third Monday in February.\nSo actually you need two definition blocks in order to define the Washington's birthday holiday correctly.\n\n```xml\n\u003c!--\n  http://en.wikipedia.org/wiki/Washington%27s_Birthday\n  George Washington (February 22, 1732 – December 14, 1799)\n --\u003e\n\u003choliday\u003e\n    \u003cdescription language=\"en\" name=\"Washington's Birthday (President's Day)\" type=\"federal holiday\"/\u003e\n\n    \u003c!-- Titled Washington's Birthday, the federal holiday was originally\n         implemented by the United States federal government in 1880 for\n         government offices in the District of Columbia (20 Stat. 277) and\n         expanded in 1885 to include all federal offices (23 Stat. 516). --\u003e\n    \u003cdefinition firstyear=\"1885\" lastyear=\"1970\"\u003e\n        \u003cfixed day=\"22\" month=\"February\"/\u003e\n    \u003c/definition\u003e\n    \u003c!-- On January 1, 1971 the federal holiday was shifted to the third\n         Monday in February by the Uniform Monday Holiday Act. --\u003e\n    \u003cdefinition firstyear=\"1971\"\u003e\n        \u003crule nth=\"3rd\" weekday=\"Monday\" month=\"February\"/\u003e\n    \u003c/definition\u003e\n\u003c/holiday\u003e\n```\n\n\n### Celebrated on a particular weekday of the nth full week of a particular month\n\n#### Example: on the Tuesday of the first full week of May\n\nSince 1986 the National Teacher Day is celebrated on Tuesday of the first full week of May.\nIn the US, the week begins with Sunday, therefore the first full week begins with the first Sunday in May.\nIf you add two days, you get Tuesday.\n\n```xml\n\u003choliday\u003e\n    \u003cdescription language=\"en\" name=\"National Teacher Day\"/\u003e\n\n    \u003c!-- ... --\u003e\n    \u003cdefinition firstyear=\"1986\"\u003e\n        \u003crule nth=\"1st\" weekday=\"Sunday\" month=\"May\"/\u003e\n        \u003cadd days=\"+2\"/\u003e \u003c!-- will become Tuesday --\u003e\n    \u003c/definition\u003e\n\u003c/holiday\u003e\n```\n\n#### Example: on the Wednesday of the last full week of April\n\nThe National Secretaries Day is observed on the Wednesday of the last full week of April.\nIn the US, the week begins with Sunday and it ends with Saturday.\nThe last full week is therefore the week which ends with Saturday (the last Saturday in April).\nIn order to get the Wednesday of the last full week of April, simply subtract three days.\n\n```xml\n\u003choliday\u003e\n    \u003cdescription language=\"en\" name=\"National Secretaries Day\"/\u003e\n\n    \u003c!-- ... --\u003e\n    \u003cdefinition firstyear=\"1955\" lastyear=\"1980\"\u003e\n        \u003crule nth=\"Last\" weekday=\"Saturday\" month=\"April\"/\u003e\n        \u003cadd days=\"-3\"/\u003e \u003c!-- this is Wednesday --\u003e\n    \u003c/definition\u003e\n\u003c/holiday\u003e\n```\n\n### Celebrated on a particular weekday nearest a particular date\n\n#### Example: on Monday nearest July 1st\n\nIn the Canadian provinces Newfoundland and Labrador, the Memorial Day is observed on the Monday nearest July 1st.\nSet the fixed date (July 1) and use the goto-direction called \"nearest\". The definition:\n\n```xml\n\u003choliday\u003e\n    \u003cdescription language=\"en\" name=\"Memorial Day\" region=\"Newfoundland and Labrador\"/\u003e\n\n    \u003cdefinition\u003e\n        \u003c!-- it is celebrated on the Monday nearest July 1st --\u003e\n        \u003cfixed day=\"1\" month=\"July\"/\u003e\n        \u003cgoto weekday=\"Monday\" direction=\"nearest\"/\u003e\n    \u003c/definition\u003e\n\u003c/holiday\u003e\n```\n\n### Celebrated in a different calendar system\n\n#### Example: Hebrew Calendar: Fast of Esther in Israel\n\nIn Israel the Fast of Esther is observed on the 13th day of the Hebrew month of Adar. So we need to specify\nthe hebrew calendar for the definition.\n\n```xml\n    \u003choliday\u003e\n        \u003cdescription language=\"he\" name=\"תַּעֲנִית אֶסְתֵּר\" type=\"Jewish holiday\"/\u003e\n        \u003cdescription language=\"en\" name=\"Fast of Esther\" type=\"Jewish holiday\"/\u003e\n        \u003cdescription language=\"de\" name=\"Ta’anit Esther\" type=\"Jewish holiday\"/\u003e\n\n        \u003cdefinition\u003e\n            \u003c!-- The fast is observed on the 13th day of the Hebrew month of Adar --\u003e\n            \u003c!-- When the year has two Adar months, it is observed only in the second Adar --\u003e\n            \u003cfixed calendar=\"hebrew\" day=\"13\" month=\"Adar\"/\u003e\n            \u003ccondition calendar=\"hebrew\" ifweekday=\"Shabbat\"\u003e\n                \u003c!--If the date of the Fast of Esther falls on Shabbat (Saturday),\n                the fast is instead observed on the preceding Thursday --\u003e\n                \u003cadd calendar=\"hebrew\" days=\"-2\"/\u003e\n            \u003c/condition\u003e\n        \u003c/definition\u003e\n    \u003c/holiday\u003e\n```\n\n### Seasons: a day dependent on Solstice or Equinox\n\n#### Example: the Solstice in June in Germany\n\nIn June 2008 the Solstice was on June 20 at 23:59 UTC (24 h system). This was the begin of summer for people living\nin the northern hemisphere and it was the start of winter for people living in the southern hemisphere.\nIn Germany's caldendars, you find June 21, 2008 for the Solstice.\nThis is because of the timezone difference of 2 hours from UTC.\nFor the Europe/Berlin timezone the actual Solstice was on June 21, 2008 at 1:59 (24 h system).\nAs the actual day of the Solstice (or Equinox) is dependent on the timezone in a country,\nyou can specify it with the parameter called timezone.\n\n```xml\n\u003choliday\u003e\n    \u003cdescription language=\"de\" name=\"Sommeranfang (Sommersonnenwende)\"/\u003e\n    \u003cdescription language=\"en\" name=\"Solstice June\"/\u003e\n\n    \u003cdefinition\u003e\n        \u003csolstice type=\"June\" timezone=\"Europe/Berlin\"/\u003e\n    \u003c/definition\u003e\n\u003c/holiday\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonelo%2Fxml-holidays","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonelo%2Fxml-holidays","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonelo%2Fxml-holidays/lists"}