-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add holidays in lieu #10
Conversation
Thanks for this! Will have a look at it as soon as I have a chance. |
Whenever a holiday falls on a weekend, show both weekend (actual date) and replacement (observed date). Fix consecutive holidays such as Christmas Day and Boxing Day so that observed dates are correct. Tested with Australian and UK holidays.
2b27c01
to
6fbea19
Compare
js/holidays.js
Outdated
var observedName = options.observedName; | ||
if ( !observedName ) { | ||
switch ( country ) { | ||
case 'au': | ||
observedName = `Additional public holiday for ${name}`; | ||
break; | ||
case 'uk': | ||
observedName = `${name} (in lieu)`; | ||
break; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we could simplify this by just adding "(observed)" to the original holiday name, as you proposed in #7?
The actual text could be a string in the translations object and we would do it for all countries which have observed holidays.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a quick look, doesn't seem like there is an official spelling. Will you be happy with "(in lieu)" added only in AU and UK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both AU and UK seem to use "substitute day" in those pages. I remember seeing "observed" in US calendars.
You have a point with the holiday names, but "Año Nuevo (in lieu)" looks weird to me. I think we either use the same language of the holiday name or the language selected for the calendar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a quick look, doesn't seem like there is an official spelling. Will you be happy with "(in lieu)" added only in AU and UK?
I think we can do this for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All fixed.
4c3a256
to
2d5e332
Compare
Add, not replace, holidays in lieu; fix consecutive holidays
Whenever a holiday falls on a weekend, show both weekend (actual date) and replacement (observed date).
Fix consecutive holidays such as Christmas Day and Boxing Day so that observed dates are correct.
Tested with Australian and UK holidays. I'm not familiar with the rules in other countries, they might need an update for consistency.
Fixes #7.