Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added italian Public Holidays to opening_hours.js #74

Merged
merged 1 commit into from
Feb 26, 2015

Conversation

damjang
Copy link

@damjang damjang commented Feb 24, 2015

Added also the code to calculate firstSundays and firstSeptemberSunday

Added also the code to calculate firstSundays and firstSeptemberSunday
@ypid
Copy link
Member

ypid commented Feb 24, 2015

Thanks very much. Did you check that the holidays are evaulated as they should be? Can you maybe add a test?

@damjang
Copy link
Author

damjang commented Feb 25, 2015

No, I don't check anything. And yes, I can try to add some tests. I must understand how to do it...

@ypid
Copy link
Member

ypid commented Feb 25, 2015

No problem. I am going to do it.

@ypid
Copy link
Member

ypid commented Feb 25, 2015

Added. Please validate that the holidays for 2014 are calculated as they should be: https://github.com/ypid/opening_hours.js/blob/097b91863d4ac880a0c879a533c11fd5251db69d/test.js#L1061
Thanks for taking the time to add the public holidays for Italy 👍

@ypid
Copy link
Member

ypid commented Feb 25, 2015

Are all cases for PHs handled, or are there cases which you could not implement? (See us holidays for example.

@damjang
Copy link
Author

damjang commented Feb 26, 2015

There is not implemented only the SAINT PATRON day, because every municipality (Comune) has its patron and in Italy we have something like 8000 municipalities :-)

@ypid ypid merged commit ae4a3a5 into opening-hours:master Feb 26, 2015
@verdy-p
Copy link

verdy-p commented Apr 21, 2016

The Italians saint-patron date just has to be set in each municipality (I hope that these saint-patrons do not have variable dates in year; but if it also depends on reforms of Catholic calendar of celebrations when some saints are added and other moved to other dates, e.g. for oecumenical reasons after reaching agreements with other churches, or by papal or episcopal decisions so that some saints will not be fested the same day as another catholic date... it is possible that some saints could have their celebration date based on easter date, or even on trhe orthodox easter)

Finally note that "easter" for now assumes the occidental easter date (Roman catholic & protestant), but there is also the orthodox easter (with at least two known variants), and the jewish easter!

In islamic countries, some public holiday dates are based on the islamic calendar, but with more complex rules as some dates are determined by local observation of sun (and not all islamic countries or regions have the same date, for example for the end of Ramadan, and this is not just a question of timezone as this depends on the latitude and altitude of a chosen observation point, but it also depends on several traditional computes with some differences between sunnites and shiites; some expatriated communicites also prefer the date chosen in their home country, or the date computed for Mecca only adjusted by legal timezone differences).

@verdy-p
Copy link

verdy-p commented Apr 21, 2016

Also school holidays in France are not computed by "state" (in France there's no state, only administrative regions, but these regions are also not used for this, not even before the 2016 reform of French regions), but by educational academies (there are 26 academies in the continental European part of France, grouped in 3 "zones" A, B and C for fixing school holidays, plus some other academies in overseas with their own school holiday calendar).

In OSM data you'd have to look for "educational" boundaries, not "administrative" boundaries because some academies are splitting the continental regions. Generally you get the correct holiday zone A, B or C from each department instead.
See:
http://www.education.gouv.fr/pid25058/le-calendrier-scolaire.html
(the 3 zones are all defined as groups of "academies"; in Corsica and overseas, the calendars are specific)

@ypid
Copy link
Member

ypid commented Apr 22, 2016

some dates are determined by local observation of sun

Ok, that is bad for our purposes. That will require a way to define PH for each year (when not deterministic) just like SH are currently defined.

Also school holidays in France are not computed by "state" […]

Good to know. Why must it always be complicated 😉 ?

Might you be able to transform your knowledge into a pull request? For French SH there is currently no way to check for "educational" boundaries inside the library as it currently only gets data provided by Nominatim. Not sure yet what to do about that. But your input on easter should be possible to implement e.g. orthodox easter is already implemented and available for holidays to depend on.

@verdy-p
Copy link

verdy-p commented Apr 22, 2016

Nominatim effectively does not retrive anything else than admin boundaries
But schools are note really administrative units. Note that school hilidays also only apply to public primary and secondary schools ("collège", "lycée" in French).
For higher levels (universities) or professional schools, these school holidays do not apply: each establishment has its own calendar.
Also various private schools do not necessarily follow the standard public school calendar, and there are even public establishments that have opted for a different calendar (for example adding a few school days to reduce their weekly scheduled hours).

These school holidays are not mandatory. In fine the public schools are owned and managed by communes (municipalities) in the child-level and primary level, and by departments in the secondary level. They are "supervized" by rectors of academies. French regions play no role at these levels (except for provding some additional subsidies or participate in investments). The French collectivites also do not define the official programs (that are decided nationaliy at ministry level, and rectors of academies control that).

Most regions now have several academies (in 2016, 16 metropolitan regions have merged into 7, 6 other metropolitan regions were left unchanged: before this there were 22 metropolitan regions but still 26 academies).

French academies are only competent for the mandatory scholarship at primary and secondary level. They have no compentence on "maternelles" schools for younger children (starting at 3 y.o. in France up to 6 y.o. for the first level of mandatory primary school) and post-graduate degrees. Their compentence is only on the primary and secondary schools (public, or private under contract wit the state).

They fix the school holidays only as a default standard in their area, but schools may decide locally (with parents) to apply a different calendar (they can opt for a 4 days/week calendar or 4.5-days/week calendar with longer holidays). Academies are also organizing the recruitment and employment of teachers in public schools (not in private schools). Individual establishments recruit themselves other personals. Teachers and other personals frequently have an extended calendar for their working days (on days where there's no child present, or sometimes for receiving children during holidays in some of them).

Note: "primary" schools in France are in fact the union of two distinct schools in a place sharing some equipments : a "maternelle" for children that are under the mandatory age of 6, and a "elementary" school.

Under 3 y.o. children don't go at school but are in "kindergartens" ("chèches" in French). These are organized by municipalities, organizations, or privately organized . The French kindergartens receive help from the social security, the department, and from employers. (all these, plus "maternelles" schools all controled by departmental social services for childhood)

"Maternelles" are not organized and controled by rectorates of academies but by municipalities (with a litlle help from their department for small communes, but no help from regions).

@verdy-p
Copy link

verdy-p commented Apr 22, 2016

Note that the link
http://www.education.gouv.fr/pid25058/le-calendrier-scolaire.html
also provides calendars for the 3 zones in "ical" format.
(school calendars are decided each year for the next one or two years at most)

Most French people do not know exactly from which rectorate of academy they depend for schools (or they don't care about that: in case of problems their first contact is the establishment, or the commune to get more open places in local schools). But most people with children around know in which academic zone (A, B, or C on the continent only) they are: this plays a very important planification role for the tourism and transport sectors and for the commerce in general, as well as in lots of private companies for planning holidays for employees with children.

@ypid
Copy link
Member

ypid commented Apr 23, 2016

@verdy-p You should have opened a new issue for French SH I think. PR are still welcome if you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants