Skip to content

Add Holidays for Spain#49

Open
rschillinger wants to merge 2 commits intocheckdomain:masterfrom
rschillinger:master
Open

Add Holidays for Spain#49
rschillinger wants to merge 2 commits intocheckdomain:masterfrom
rschillinger:master

Conversation

@rschillinger
Copy link

No description provided.

@wandersonwhcr
Copy link
Contributor

👍

IMHO, we should use a code sniffer to standardize source code. i.e. some files use array() and others [];

@rschillinger
Copy link
Author

rschillinger commented Dec 22, 2020

I can quickly make the change. The classes I looked into were using array(). I assumed it was for some kind of legacy purpose.

Personally I would rather use [] since it is starting to standardize.

[EDIT]
I did not find any file using [] though

@wandersonwhcr
Copy link
Contributor

Damn, my class is not standardized 😆 (BR Provider).

Sorry!

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find some differences here with my information from Wikipedia. Which source did you use?

Comment on lines +50 to +59
'03-19' => $this->createData('San José', array(
self::STATE_CM,
self::STATE_CV,
self::STATE_GA,
self::STATE_IB,
self::STATE_MA,
self::STATE_ME,
self::STATE_MU,
self::STATE_PA,
)),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local/regional holidays change from one year to another. It seems impossible to integrate them automatically since they are decided arbitrarily

Public holidays celebrated in Spain include a mix of religious (Roman Catholic), national and regional observances. Each municipality is allowed to have a maximum of 14 public holidays per year; a maximum of nine of these are chosen by the national government and at least two are chosen locally.

If one of the "national holidays" happens to fall on a Sunday the regional governments — the autonomous communities of Spain — can choose an alternate holiday or they can allow local authorities to choose. In practice, except for holidays falling on a Sunday, the regional governments can choose up to three holidays per year; or they can choose fewer to allow for more options at the local level.

You can see it for instance at : https://www.calendarioslaborales.com/

Comment on lines +50 to +64
'03-19' => $this->createData('San José', array(
self::STATE_CM,
self::STATE_CV,
self::STATE_GA,
self::STATE_IB,
self::STATE_MA,
self::STATE_ME,
self::STATE_MU,
self::STATE_PA,
)),
'04-23' => $this->createData('Día de la comunidad', array(
self::STATE_AR,
self::STATE_CA,
self::STATE_CL,
)),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only CL marked in Wikipedia.

Comment on lines +13 to +30
const STATE_AN = 'Andalucía';
const STATE_AR = 'Aragón';
const STATE_CA = 'Cataluña';
const STATE_CE = 'Ceuta';
const STATE_CL = 'Castilla y León';
const STATE_CM = 'Castilla La Mancha';
const STATE_CN = 'Cantabria';
const STATE_CV = 'Comunidad Valenciana';
const STATE_EX = 'Extremadura';
const STATE_GA = 'Galicia';
const STATE_IB = 'Islas Baleares';
const STATE_IC = 'Islas Canarias';
const STATE_LR = 'La Rioja';
const STATE_MA = 'Madrid';
const STATE_ME = 'Melilla';
const STATE_MU = 'Murcia';
const STATE_PA = 'Principado de Asturias';
const STATE_PV = 'País Vasco';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like NC is missing?
https://en.wikipedia.org/wiki/Navarre

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.

2 participants

Comments