Skip to content

Commit 415b724

Browse files
committed
Add docs regarding holidays
See #123
1 parent ef8e106 commit 415b724

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

CONTRIBUTING.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,29 @@
22
Before you report something, read the reporting rules [here](https://github.com/FossifyOrg/General-Discussion#how-do-i-suggest-an-improvement-ask-a-question-or-report-an-issue) please.
33

44
### Contributing as a developer
5-
Some instructions about code style and everything that has to be done to increase the chance of your code getting accepted can be found at the [General Discussion](https://github.com/FossifyOrg/General-Discussion#contribution-rules-for-developers) section.
5+
Some instructions about code style and everything that has to be done to increase the chance of your code getting accepted can be found at the [General Discussion](https://github.com/FossifyOrg/General-Discussion#contribution-rules-for-developers) section.
66

77
### Contributing as a non developer
88
In case you just want to for example improve a translation, you can find the way of doing it [here](https://github.com/FossifyOrg/General-Discussion#how-can-i-suggest-an-edit-to-a-file).
9+
10+
### Contributing holidays
11+
12+
- For most countries, holidays are generated automatically using the [date-holidays](https://github.com/commenthol/date-holidays) library. You can find the list of countries supported by date-holidays [here](https://github.com/commenthol/date-holidays?tab=readme-ov-file#supported-countries-states-regions).
13+
- The app includes **a different set of countries** compared to date-holidays. For an exhaustive list of countries **_included_ in the app**, check out [holiday generator configuration](https://github.com/FossifyOrg/Calendar/blob/master/.github/workflows/holiday-generator/config.js) file.
14+
- Contributions are welcome for countries that are not yet supported by date-holidays but _are_ included in the app.
15+
16+
#### Adding holidays
17+
18+
_Basic knowledge about git, forks, pull requests and [ICS syntax](https://en.wikipedia.org/wiki/ICalendar) is required._
19+
20+
Adding holidays manually is slightly complicated than necessary due to periodic updates from the generator (to be simplified) so it's highly recommended to add holidays directly to the upstream date-holidays project. That way, everyone benefits from your contribution but if that's not an option, follow these steps:
21+
22+
- Create a new folder in the [holidays directory](https://github.com/FossifyOrg/Calendar/tree/master/app/src/main/assets/holidays). The folder name should be your country's [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) code.
23+
- Create the following ICS files inside your newly created folder:
24+
- `public.ics` for public holidays.
25+
- (optional) `regional.ics` for regional/state-specific holidays (holidays observed in some state/region but not country-wide).
26+
- (optional) `other.ics` for observances and other non-official holidays.
27+
- Update [metadata.json](https://github.com/FossifyOrg/Calendar/blob/master/app/src/main/assets/holidays/metadata.json) as per your country code and the corresponding ICS files you have created.
28+
- Add your country to the list _unsupported_ countries in the [holiday generator configuration](https://github.com/FossifyOrg/Calendar/blob/master/.github/workflows/holiday-generator/config.js#L73) file. This step ensures your holiday files aren't removed by the generator's future updates.
29+
- Test your changes locally to ensure everything is working as expected.
30+
- Finally, commit your changes and open a pull request.

0 commit comments

Comments
 (0)