Giter VIP home page Giter VIP logo

definitions's Introduction

Holidays Definitions Build Status

This repository contains the 'raw' definitions for the various holidays projects. It should be added a submodule to any project that wants to use them.

Currently it is only used by the existing Holidays gem, which takes these definitions and generates ruby classes for use in that gem. In the future it will be used by other languages in a similar manner.

Please note that this is not a gem. The validation process is written in ruby simply for convenience. The real stars of this show are the YAML files.

Documentation

  1. Syntax Guide
  2. Contribution Guidelines
  3. Maintainer Guidelines
  4. Architecture Decision Records

Credits

Thank you to all of these wonderful contributors!

definitions's People

Contributors

achr3f avatar adamlyons2 avatar aleksandrs-ledovskis avatar andres107 avatar anotherjosmith avatar danger-ranger avatar fabdurso avatar frankieroberto avatar ghiculescu avatar glendel avatar hbontempo-cw avatar hlascelles avatar jiveeee avatar jonathanpike avatar jonjonw avatar kapil2004 avatar kpletes avatar kunitoo avatar larsatist-dk avatar marocchino avatar pmor avatar ppeble avatar roman-ih avatar ryosukeyamazaki avatar saygun avatar skalimer0 avatar spaceneedle2019 avatar tabbasi88 avatar ttwo32 avatar vassilios avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

definitions's Issues

Update Travis config to remove outdated rubies and add latest versions

Even though we only use ruby for definition validation and testing in this repository we should still attempt to stay up to date. This will mean dropping ruby 2.3 and adding ruby 2.6 and jruby-9.2.5.0.

In the future I would very much like to find a solution for #42 and this will most likely involve ruby in some way. Staying up to date now will save us trouble in the future.

Improve readability of errors returned by definition validator

Brief Synopsis of the feature request / desired behavior change

The make validate command should always validate all YAML files rather than immediately raising an error on the first problem found and stopping execution.

Additionally the error output displayed to the user should be updated to display the following:

  • a summary of the total definition YAML files checked and the number that passed or failed
  • an easily readable list of the errors that are grouped by definition file and clearly specify each problem found and what must be done to fix it

Description of current behavior

A user can run make validate in the repository root and it will iterate over every definition yaml file and ensure that each one contains no syntax issues.

The current behavior is that the entire process halts once the first error is found. The message displayed to the user provides an explanation and usually also the record in question rather than the specific value that caused the error.

As an example I added an invalid value to the ar.yaml on my local machine:

~/code/ppeble/definitions(master ✗) make validate
bundle exec ruby lib/validation/run.rb
Failed on file '/Users/phil/Code/ppeble/definitions/lib/validation/../../ar.yaml', error: All months must be an integer, received: {0=>[{"name"=>"Viernes Santo", "regions"=>["ar"], "function"=>"easter(year)", "function_modifier"=>-2}, {"name"=>"Carnaval Lunes", "regions"=>["ar"], "function"=>"easter(year)", "function_modifier"=>-48}, {"name"=>"Carnaval Martes", "regions"=>["ar"], "function"=>"easter(year)", "function_modifier"=>-47}], 1=>[{"name"=>"Año Nuevo", "regions"=>["ar"], "mday"=>1}], 3=>[{"name"=>"Día Nacional de la Memoria por la Verdad y la Justicia", "regions"=>["ar"], "mday"=>24}], 4=>[{"name"=>"Día del Veterano y de los Caídos en la Guerra de Malvinas", "regions"=>["ar"], "mday"=>2}], 5=>[{"name"=>"Día del Trabajador", "regions"=>["ar"], "mday"=>1}, {"name"=>"Día de la Revolución de Mayo", "regions"=>["ar"], "mday"=>25}], 6=>[{"name"=>"Día de la Bandera", "regions"=>["ar"], "mday"=>20}], 7=>[{"name"=>"Feriado puente turístico", "regions"=>["ar"], "mday"=>8}, {"name"=>"Día de la Independencia", "regions"=>["ar"], "mday"=>9}], "xyz"=>[{"name"=>"Paso a la Inmortalidad del General José de San Martín", "regions"=>["ar"], "mday"=>15}], 10=>[{"name"=>"Día del Respeto a la Diversidad Cultural", "regions"=>["ar"], "mday"=>12}], 11=>[{"name"=>"Día de la Soberanía Nacional", "regions"=>["ar"], "mday"=>20}], 12=>[{"name"=>"Inmaculada Concepción de María", "regions"=>["ar"], "mday"=>8}, {"name"=>"Feriado puente turístico", "regions"=>["ar"], "mday"=>9}, {"name"=>"Navidad", "regions"=>["ar"], "mday"=>25}]}

The above error was caused because I changed month 8 to xyz. This is very difficult to spot without digging through each part of the part of the message labeled 'received', which contains the entirety of the months keyword.

In addition, since the process halts on the first error that it finds this means that no other parts of the ar.yaml file are checked. If there are any validation errors present in methods or tests then a user will only see them after they have fixed the initial error and rerun make validate.

This also means that since execution is immediately stopped it is possible that other definition files are not checked. If there are errors present in other files a user will only find them after fixing all of ar.yaml and rerunning make validate.

Description of desired behavior

The make validate command should always check all found definition YAML files on each execution. Any validation errors that are found should be gathered and saved until the end of the run. Upon completing the validation of all definition files the process should display a summary and a grouped list of human readable errors with actionable information for the user.

Here is a potential example of the desired output based on the ar.yaml scenario from the section above:

~/code/ppeble/definitions(master ✗) make validate
bundle exec ruby lib/validation/run.rb

Found 70 definition YAML files to check! Starting validation checks ...
Validations complete!

Summary
---------
Total files checked: 70
Passed: 69
Failed: 1
Files containing validation errors: 'ar.yaml'

Error details by region definition:

----
Region: ar
File: ar.yaml
Total errors found: 1
Details:
  Parent key: 'months'
  Message: Expected month 'xyz' to be an integer
  Value: {'xyz' => [{'name' => 'Paso a la Inmortalidad del General José de San Martín', 'regions' => ['ar'], 'mday' => 15}]
----

(the above is only a suggestion, the final product can be tweaked for readability as necessary)

This would allow users to see all problems at once in a clear format rather than forcing them to rerun the validation process over and over.

Dynamic calculation for AU QLD Ekka holiday

We had an issue recently where the date 2022-08-17 was being recognised as the day for the Brisbane region-specific holiday of Ekka in Australia. However, the holiday had already occurred the week prior.

Having a poke around, I've seen that the holiday is currently using a static value for the third-last Wednesday of August:

8:
  - name: Ekka
    regions: [au_qld_brisbane]
    week: -3
    wday: 3

However, as defined on the QLD public holidays page:

The Royal National Agricultural (RNA) Show Day (Brisbane only) is held on the Wednesday during the RNA Show period. The RNA Show commences on the first Friday in August, unless the first Friday is prior to 5 August, then it commences on the second Friday of August.

Figure out way to allow for definition tests to be run against definitions in this repository

We have a problem. Currently it is possible for someone to submit definition changes, not update the related tests, and everything will return 'green'. The make validate only ensures that the syntax is right, not the meaning behind the syntax. This can lead to situations that require PRs like this: #41

Through no fault of the submitter I only found the problem when I was about to release the next version of the ruby gem.

I think we could do something like this:

  1. Complete #7 (DONE)
  2. Complete #24 (DONE!)
  3. Add a way to run the updated definitions against all consuming apps. This should probably be a separate script (shell or ruby, either way) that will clone the consuming apps (right now just ruby), modify it so it points to the modified definitions, re-generate, and then run the make test command for the app. This would prove that the new defs were behaving as expected and did not lead to any parsing errors.

Only after we have done this will this repo be truly standalone. The current straddling that we are doing is not great for submitters and, over the long run, will cost us contributors.

RO region outdated

Hello,

This is regarding public holidays in Romania.
According to:

Some Bank holidays were added. Below are when they will fall in 2019:

I am okay to do a merge request with the changes, I am just unsure about the Orthodox Good Friday. Is there an existing helper method for that?

Best regards

Anzac Day in nsw_au

When i set options to ['au_nsw', :observed] eg:
Holidays.between(Date.parse('2021-01-01'), Date.parse('2021-12-31'), 'au_nsw', :observed)

I get ANZAC Day repeated. both the formal (Sunday 2021-04-25) and observed (Monday 2020-04-26)
It seems to be the only nsw_au holiday to have this problem

Manage Belgium parent region

This is a duplicate of holidays/holidays#381
But since this belongs here. Here I am

Hello,

When i search holidays for ":be" , i've a nice

Holidays::InvalidRegion (Holidays::InvalidRegion)

I see it's the not the same for ":ca", because we have the region definition in REGIONS

we should be able to do the same for belgium ?

Michael

Add a test runner for the holiday definitions

I think it would be useful to run the tests defined in the definitions in this repository together with the rspec test suite. It would enable the authors to easily test their definitions and would also make the result visible in the PRs.

This probably requires to copy quite some code from the holidays gem, but I think it'll be worth it.

Chinese holidays

Is there any reason Chinese holidays aren't included in this? Would y'all be open to a PR for it?

Change 'methods' in definitions to be more generic

This one is gonna be tough. In order to complete the transition to completely generic YAML in our definitions (thereby allowing the definitions to be used in other languages) we will need to come up with a DSL for removing the current ruby code that makes up the definitions. I don't have solid ideas yet for what we will do but I will use this issue as a way to propose ideas going forward.

Example:

afl_grand_final:
    arguments: year
    source: |
      case year
      when 2015
        Date.civil(2015, 10, 2)
      when 2016
        Date.civil(2016, 9, 30)
      when 2017
        Date.civil(2017, 9, 29)
      end

This could be done as follows:

afl_grand_final:
    arguments: year
    logic:
      if:
        argument: year
        value: 2015
        then: 2015-10-2
      if:
        argument: year
        value: 2016
        then: 2016-9-30
      if:
        argument: year
        value: 2017
        then: 2017-9-29

There are a few immediate concerns:

  1. There is some relatively complex logic in some of the methods. It might be difficult to make a DSL that isn't just...ruby-like. I'm not sure how to approach this.
  2. There are a few cases where a method will call one of our 'common' methods. For example, 'easter' is a 'common' method that anyone can call but are considered 'private' inside of the ruby holidays code. I think we would need to define these 'common' methods in these definitions and then make them callable somehow. This could be very difficult.

de_by_aux is incorrect.

I tried to fix something here on de_by_aux.
Which, in my opinion is Holidays in Augsburg, which is in Bavaria.
So, all holidays in Bavaria should be in de_by_aux plus Friedensfest on the 8th of August.

When doing:

Holidays.between(Date.today.beginning_of_year, Date.today.end_of_year, :de_by).length

result is 13, correct!

When doing:

Holidays.between(Date.today.beginning_of_year, Date.today.end_of_year, :de_by).length

result is 10, incorrect!

Turns out Allerheiligen, Mariä Himmelfahrt and Fronleichnam are missing.

Additionally I discoverd :de_sn_aux and :de_th_aux. I guess this should be DE Schleswig-Holstein Augsburg and DE Thüringen Augsburg. Both things don't exist. So I don't get it, please explain and I'll help to improve this. Thanks

de_by Issue on Mariä Himmelfahrt 15th of august

As stated in the bavarian law and also on wikipedia. The 15th of august is only a holiday in bavarian counties (Gemeinden) with a majority of catholics compared to the protestants. So if there will be 80% not catholic or protestant, but 11% catholic vs. 9% protestant, it'll still be a holiday.
This is checked all 4 to 5 years by the bavarian statistics agency. Find attached a map of where this is a holiday, blue states holiday, white no holiday.

https://www.statistik.bayern.de/medien/presse/221_2016_44_a_himmelfahrt_karte.pdf

Adding US bank holiday

I see where you define formal vs informal. We consider formal dates as government-defined holidays. These could be the kinds of holidays where everyone stays home from work or perhaps are bank holidays but it is not required for a holiday to have these features to be considered formal.

Can we add some way to know if a holiday is also a US bank holiday (regardless of formal vs informal)? It would be helpful to identify bank holidays recognized by the Federal Reserve - https://www.chicagofed.org/utilities/about-us/bank-holidays

Discuss AU holidays

I merged a PR that removed a test from :au_tas here: #35

I laid out why I did this and what we need to discuss. In short: any :au holiday will also apply to :au_tas. Since we have New Year's Day specified here with :au when you call :au_tas it will pick it up.

This is not what we have specified that we want. We want to call :au_tas and have it pick up ONLY the :au_tas holiday.

One solution that I just thought of: what if a subregion has the exact same holiday definition? If it does, could it just replace the 'parent' region's definition automatically? I think that would give us what we want.

Another solution is to add some kind of flag to not apply parent region holidays when querying a subregion. I'm not sure what users will want more.

Tagging @ghiculescu and @adamlyons2 for this discussion.

Change 'tests' in definitions to be more generic

Right now all of the 'tests' are ruby. This has to change if we want to use these definitions in other languages. We need a format that can express all of the tests that exist today in a YAML format.

My proposal:

tests:
  - name: "New Year's Day"
    year: 2015
    month: 1
    day: 1
    regions: ['us']
  - name: Columbus Day
    year: 2015
    month: 10
    day: 10
    options: ['observed']
    regions: ['us']
  - name: "Phil's Birthday!"
    year: 2015
    month: 8
    day: 8
    options: ['informal']
    regions: ['us']
  - name: "Something"
    year_range: 2014..2020
    month: 1
    day: 1
    options: ['observed']
    regions: ['us', 'uk']
  - name: "Else"
    year: 2016
    month: 6
    day: 15
    valid: false
    regions: ['us']

The region should be implicit based on the current file being tested.

I'm going to try to do this now and the modify the ruby repository to generate based on these new definitions. If I do it right then the generated classes will look identical to the existing ones.

Wrong definition for the German holiday "Reformationstag" for the year 2017

Hi,

"Reformationstag" is a German regular holiday on October 31st each year for the regions de_bb, de_mv, de_sn, de_st, de_th only, and informal for de_bw.

The year 2017 is an exception from this rule: it's a holiday in all regions in Germany in this year, and in this year only.

The definition of this holiday is wrong for years != 2017. It should yield no results if a region is specified and the region is not one from the list mentioned above. Example for de_ni in 2018:

Wrong:

Holidays.on(Date.civil(2018,10,31), :de_ni)
 => [{:date=>Wed, 31 Oct 2018, :name=>"Reformationstag", 
      :regions=>[:de_sh, :de_ni, :de_hh, :de_hb, :de_be, :de_bb, :de_mv, :de_sn, :de_st, :de_th]}]

Expected:

Holidays.on(Date.civil(2018,10,31), :de_ni)
 => []

Holidays version: 6.1.0

rename `before` and `after` in the definitions

The labels before and after for year_ranges are confusing, as the words usually don't include the point in time they refer to (e.g.: "after 2018" usually means, from 2019 on). I think, before should be named until and after should be named from

So, instead of

7:
  name: 振替休日
  regions: [jp]
  mday: 1
  year_ranges:
    - before: 2002

I suggest to write:

7:
  name: 振替休日
  regions: [jp]
  mday: 1
  year_ranges:
    - until: 2002

The only question to me would be how to handle the upgrade path before releasing a 5.0.0. Maybe it would be best to just add the new words to the definition and remove the old ones only with the new major release?

Incorrect NZ regional holidays

👋 It looks like Southland Anniversary Day, Hawke's bay Anniversary Day and Canterbury Anniversary Day observed regional holidays in NZ are incorrect.

Holidays.between('2024-01-01', '2024-12-31', :nz_, :observed).reject { |holiday| holiday[:regions].include? :nz }

=> 
[{:date=>Wed, 17 Jan 2024, :name=>"Southland Anniversary Day", :regions=>[:nz_sl]},
 {:date=>Mon, 22 Jan 2024, :name=>"Wellington Anniversary Day", :regions=>[:nz_we]},
 {:date=>Mon, 29 Jan 2024, :name=>"Nelson Anniversary Day", :regions=>[:nz_ne]},
 {:date=>Mon, 29 Jan 2024, :name=>"Auckland Anniversary Day", :regions=>[:nz_ak]},
 {:date=>Mon, 29 Jan 2024, :name=>"Northland Anniversary Day", :regions=>[:nz_nl]},
 {:date=>Mon, 11 Mar 2024, :name=>"Taranaki Anniversary Day", :regions=>[:nz_ta]},
 {:date=>Mon, 25 Mar 2024, :name=>"Otago Anniversary Day", :regions=>[:nz_ot]},
 {:date=>Mon, 23 Sep 2024, :name=>"Dominion Day", :regions=>[:nz_sc]},
 {:date=>Fri, 04 Oct 2024, :name=>"Hawke's bay Anniversary Day", :regions=>[:nz_hb]},
 {:date=>Mon, 04 Nov 2024, :name=>"Marlborough Anniversary Day", :regions=>[:nz_mb]},
 {:date=>Fri, 08 Nov 2024, :name=>"Canterbury Anniversary Day", :regions=>[:nz_ca]},
 {:date=>Mon, 02 Dec 2024, :name=>"Chatham Island Anniversary Day", :regions=>[:nz_ch]},
 {:date=>Mon, 02 Dec 2024, :name=>"Westland Anniversary Day", :regions=>[:nz_wl]}]

Here are the correct rules for the observed dates from the government website

Hawke's Bay Anniversary: Moves to Friday before Labour Day.

Canterbury Anniversary: ... is the second Friday after the first Tuesday in November each year.

Southland Anniversary: Normally observed on Easter Tuesday.

"VI" is the ISO_3166-2 code for US Virgin Islands but this gem uses it for Vietnam

"VI" is the ISO_3166-2 code for US Virgin Islands source
"VN" is the ISO_3166-2 code for Vietnam source

In this gem the region code "VI" is used for Vietnam, and the code "VN" is not used. Looking through the documentation, I couldn't find a decision to follow the ISO 3166-1 alpha-2 standard, but I couldn't find any decision not to either - I haven't actually found any definition of the country codes as such. But looking at them in practice they seem to mostly follow the ISO 3166-1 alpha-2 standard anyway, which can easily lead someone (i.e. me) to wrongly assume that it is the intention, and run into trouble when cross-referencing with other sources of information. As such I would argue that almost following the standard is worse than breaking with it completely.

I would suggest that a decision be made to either follow the standard or not - and document the decision in either case. And then either change vi.yaml to vn.yaml, or add a warning that this is purposely not following the ISO standard, maybe document the cases in which it has chosen to diverge.

Wrong lunar_to_solar result in vi.yaml

Maybe result of lunar_to_solar(year, month, day, region) for region is kr and vi are different is wrong. Maybe it should be same.

For example

>> a = Holidays::DateCalculator::LunarDate.new
=> #<Holidays::DateCalculator::LunarDate:0x00000005a50b40>
>> a.to_solar(2019, 03, 10, :vi)
=> Sat, 16 Mar 2019
>> a.to_solar(2019, 03, 10, :kr)
=> Sun, 14 Apr 2019

Discuss TR holidays

Thanks to @spaceneedle2019 for TR holidays contribution. I think that TR holidays may be calculated dynamicly. Hijri GEM (4) may help us. The GEM convert hijri to geogerian vice versa.

Ramadan and Sacrifice Feast has a pattern [1,2,3]

  • 2016 Ramadan fest (first day) is Shawwal (10), 1, 1437.
  • 2017 Ramadan fest (first day) is Shawwal (10), 1, 1438.
  • 2016 Sacrifice Feast (first day) is Dhul-Hijjah(12), 10, 1437
  • 2017 Sacrifice Feast (first day) is Dhul-Hijjah(12), 10, 1438

So my idea is

# REFACTOR
begin_of_ramadan_feast = {
  '2017' => Hijri::Date.new(1438, 10, 1).to_greo,
  ...
}

# OLD
begin_of_ramadan_feast = {
  '2017' => Date.civil(2017, 6, 25),
  ...
}

But Hijri GEM [4] have a bug [5]. After fixed, this GEM will be very helpful.

References

  1. http://www.islamicity.org/hijri-gregorian-converter/
  2. http://www.islamweb.net/emainpage/index.php?page=dateconverter
  3. http://www2.diyanet.gov.tr/DinHizmetleriGenelMudurlugu/Sayfalar/2017DiniG%C3%BCnlerListesi.aspx
  4. https://github.com/ecleel/hijri
  5. ecleel/hijri#4

Discuss recent changes to 'Thanksgiving' holidays in `kr`

We are seeing failures when attempting to generate/test after recent updates for kr. The following test is now failing and we are not sure if the test is wrong, if the original definition is wrong, or if there is a legitimate bug in the ruby repository.

Link: https://github.com/holidays/definitions/blob/master/kr.yaml#L158-L163

Source test:

  - given:
      date: '2017-10-04'
      regions: ["kr"]
      options: ["informal"]
    expect:
      name: "추석"

Side note: this isn't a big deal, unfortunately our current setup and is a known issue. I'm working on fixing it!

But until then, I would like some help in understanding the holidays. I am specifically referring to these: https://github.com/holidays/definitions/blob/master/kr.yaml#L47-L59

Now, I'm not a native Korean speaker (obviously! 😄 ) but google translate says the following means:

This is confusing to me, mainly because I don't understand the difference between 'Thanksgiving' and 'Chuseok Holidays'. As far as I can tell it's just different names for the same holiday but I could easily be wrong.

In addition, I don't fully understand the 'correct' definitions here. It seems to be traditionally a multi-day holiday. So I was hoping for some help from any of our contributors that understand the details here to help @ttwo32 and I navigate this.

Here is what I would like answered:

  • Can you help us understand the difference in the holiday names as they stand today?
  • Can you help us understand if our current definitions are correct?
  • Can you help us understand why we need to repeat 'Chuseok Holidays' on the 14th and 16th but not the 15th, as defined?

Any additional details would be much appreciated! Pinging @swcheon @jonathanpike @marocchino for help since you are the three non-maintainers that have helped us in the past. Thank you so much!

data returned is inaccurate

Great and easy to use but unfortunately the data which is returned is incorrect.

So for UK the following dates are missing

[{:title=>"Easter Monday", :date=>"2016-03-28", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2016-08-29", :notes=>"", :bunting=>true}, {:title=>"Christmas Day", :date=>"2016-12-27", :notes=>"Substitute day", :bunting=>true}, {:title=>"New Year’s Day", :date=>"2017-01-02", :notes=>"Substitute day", :bunting=>true}, {:title=>"Easter Monday", :date=>"2017-04-17", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2017-08-28", :notes=>"", :bunting=>true}, {:title=>"Easter Monday", :date=>"2018-04-02", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2018-08-27", :notes=>"", :bunting=>true}, {:title=>"Easter Monday", :date=>"2019-04-22", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2019-08-26", :notes=>"", :bunting=>true}, {:title=>"Easter Monday", :date=>"2020-04-13", :notes=>"", :bunting=>false}, {:title=>"Summer bank holiday", :date=>"2020-08-31", :notes=>"", :bunting=>true}, {:title=>"Boxing Day", :date=>"2020-12-28", :notes=>"Substitute day", :bunting=>true}, {:title=>"Easter Monday", :date=>"2021-04-05", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2021-08-30", :notes=>"", :bunting=>true}, {:title=>"Christmas Day", :date=>"2021-12-27", :notes=>"Substitute day", :bunting=>true}, {:title=>"Boxing Day", :date=>"2021-12-28", :notes=>"Substitute day", :bunting=>true}, {:title=>"New Year’s Day", :date=>"2022-01-03", :notes=>"Substitute day", :bunting=>true}, {:title=>"Easter Monday", :date=>"2022-04-18", :notes=>"", :bunting=>true}, {:title=>"Spring bank holiday", :date=>"2022-06-02", :notes=>"", :bunting=>true}, {:title=>"Platinum Jubilee bank holiday", :date=>"2022-06-03", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2022-08-29", :notes=>"", :bunting=>true}, {:title=>"Christmas Day", :date=>"2022-12-27", :notes=>"Substitute day", :bunting=>true}]

and when using :observed the following dates are missing

[{:title=>"Easter Monday", :date=>"2016-03-28", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2016-08-29", :notes=>"", :bunting=>true}, {:title=>"Easter Monday", :date=>"2017-04-17", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2017-08-28", :notes=>"", :bunting=>true}, {:title=>"Easter Monday", :date=>"2018-04-02", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2018-08-27", :notes=>"", :bunting=>true}, {:title=>"Easter Monday", :date=>"2019-04-22", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2019-08-26", :notes=>"", :bunting=>true}, {:title=>"Easter Monday", :date=>"2020-04-13", :notes=>"", :bunting=>false}, {:title=>"Summer bank holiday", :date=>"2020-08-31", :notes=>"", :bunting=>true}, {:title=>"Easter Monday", :date=>"2021-04-05", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2021-08-30", :notes=>"", :bunting=>true}, {:title=>"Easter Monday", :date=>"2022-04-18", :notes=>"", :bunting=>true}, {:title=>"Spring bank holiday", :date=>"2022-06-02", :notes=>"", :bunting=>true}, {:title=>"Platinum Jubilee bank holiday", :date=>"2022-06-03", :notes=>"", :bunting=>true}, {:title=>"Summer bank holiday", :date=>"2022-08-29", :notes=>"", :bunting=>true}]

I have checked the information by using gov.uk website https://www.gov.uk/bank-holidays.json

Enforce correct naming in index.yaml

We currently allow incorrect naming of the files in our index.yaml file. We should require the following:

  1. We should have a matching file in the repo, meaning if we put 'us.yaml' then that file must exist.
  2. We should enforce '.yaml'. Right now we will allow anything.

Add Juneteenth holiday to NYSE calendar

Effective from 2022, NYSE (and other exchanges like NASDAQ and CBOE) will be closed on Juneteenth.

Under this change to NYSE Rule 7.2, the Exchange will be closed on June 19th of each year going forward. If the holiday falls on a Saturday, the Exchange will be closed the preceding Friday – and if it falls on a Sunday, the Exchange will be closed the succeeding Monday. This rule change brings the number of NYSE market holidays to ten.

See relevant announcement:
https://www.thecorporatecounsel.net/blog/2021/10/nyse-makes-juneteenth-a-new-market-holiday.html

NYSE holidays schedule: https://www.nyse.com/markets/hours-calendars

There are other pull requests which implement Juneteenth for other calendars (see for example:
#195 )

For the NYSE calendar, we would require this to start from year 2022 using something like the following:

  6:
  - name: Juneteenth National Independence Day
    regions: [nyse]
    mday: 19
    observed: to_weekday_if_weekend(date)
    year_ranges:
      from: 2022

Discuss JP holidays: The Emperor's Birthday change from 2019

I found that Japan's Emperor will change in 2019. So the old Emperor's Birthday ( 23/12 ) will be not a holiday from 2019. And new imperial era will start at 1/5, but the new Emperor's Birthday is 23/2, so 2019 will have not the Emperor's Birthday holiday. The new Emperor's Birthday ( 23/2) is a holiday from 2020.
I think that have to update 'jp.yml' for it. And I'm not sure that it have any other changes on holidays or not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.