holidays 11.1.0 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4bb2781ba121d283464899429145c411a25aaa5ff4a6a0ff5811424a56632655
4
- data.tar.gz: 3c85c4273f1d23a9e62dbc570786bac1e7f9141557fe319b941f89b3644d096a
3
+ metadata.gz: 3ddbd4a71c58985797a9d23c0915ab057dcc6c33955dd376c4d6bf666ebaf162
4
+ data.tar.gz: caff42a910a845239c211675f9f281d6eee616a701b890666638925ddf2bc4f5
5
5
  SHA512:
6
- metadata.gz: 4bbbdbf548d4dfaad1806ad22a1fbd75036148f5d822dc9623fe469c60464580615e357e1761bec427974a03c33403487478167d22a62dc91f2dffd83495eeb2
7
- data.tar.gz: 92defd8e455e8f29075fe75354cf5348efa6d4c8d2df7ecd1c42aa2015adf8b58858284dfc4797616e2970fa862b8747e03cf33f4442d5b6f82eddf7ab5c3efe
6
+ metadata.gz: 35817afac8beb46dba118b1919092d278a00281e8ef82819dbc55217520af2b3ccf27f64e84412a34d7826c7cd17002af310f42bcf94eb5423218de70a115bf0
7
+ data.tar.gz: 4bba40653e048451b4a02f1d360ba089c8211be3ce4d420f42b7f60ce57f82442ba1d77fe088978ec067af89506bf8aee71cfc0a1865e9534c16b6dea6c7f3c1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Ruby Holidays Gem CHANGELOG
2
2
 
3
+ ## 11.2.0
4
+
5
+ * Update to [v8.0.2 definitions](https://github.com/holidays/definitions/releases/tag/v8.0.2). Please see the changelog for the definition details.
6
+ * Fix `sg` observed dates so Saturday holidays are no longer shifted back to Friday ([#488](https://github.com/holidays/holidays/issues/488)). New Year's Day, National Day and Christmas Day now follow the Ministry of Manpower rule that only a Sunday holiday gets a substitute. Callers using the `:observed` option will see these holidays return the Saturday date itself, and no longer see a substitute on the preceding Friday.
7
+ * Add `sg` Chinese New Year, Vesak Day, Hari Raya Puasa, Hari Raya Haji and Deepavali ([#351](https://github.com/holidays/holidays/issues/351))
8
+ * Add `gb_sct` bank holiday for 15 June 2026 to mark the World Cup
9
+
3
10
  ## 11.1.0
4
11
 
5
12
  * Add `Holidays.region_names` and `Holidays.region_name(region)` to expose the English name of each region ([#160](https://github.com/holidays/holidays/issues/160)). Names are the ISO 3166 English short names added in [definitions #325](https://github.com/holidays/definitions/pull/325). `region_name` returns `nil` for an unknown region. `available_regions` is unchanged.
@@ -500,6 +500,7 @@ module Holidays
500
500
  {:mday => 24, :name => "San Juan", :regions => [:es_ct, :es_vc]},
501
501
  {:mday => 2, :year_ranges => { :limited => [2022] },:name => "Bank Holiday", :regions => [:gb]},
502
502
  {:mday => 3, :year_ranges => { :limited => [2022] },:name => "Platinum Jubilee", :regions => [:gb]},
503
+ {:mday => 15, :year_ranges => { :limited => [2026] },:name => "World Cup Bank Holiday", :regions => [:gb_sct]},
503
504
  {:mday => 22, :name => "Dan antifašističke borbe", :regions => [:hr]},
504
505
  {:mday => 25, :year_ranges => { :until => 2019 },:name => "Dan državnosti", :regions => [:hr]},
505
506
  {:wday => 1, :week => 1, :name => "June Bank Holiday", :regions => [:ie]},
@@ -28,7 +28,8 @@ module Holidays
28
28
  {:wday => 1, :week => -1, :year_ranges => { :until => 2021 },:name => "Bank Holiday", :regions => [:gb]},
29
29
  {:wday => 1, :week => -1, :year_ranges => { :from => 2023 },:name => "Bank Holiday", :regions => [:gb]}],
30
30
  6 => [{:mday => 2, :year_ranges => { :limited => [2022] },:name => "Bank Holiday", :regions => [:gb]},
31
- {:mday => 3, :year_ranges => { :limited => [2022] },:name => "Platinum Jubilee", :regions => [:gb]}],
31
+ {:mday => 3, :year_ranges => { :limited => [2022] },:name => "Platinum Jubilee", :regions => [:gb]},
32
+ {:mday => 15, :year_ranges => { :limited => [2026] },:name => "World Cup Bank Holiday", :regions => [:gb_sct]}],
32
33
  7 => [{:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
33
34
  {:mday => 12, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Battle of the Boyne", :regions => [:gb_nir]}],
34
35
  8 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct]},
@@ -13,12 +13,54 @@ module Holidays
13
13
  def self.holidays_by_month
14
14
  {
15
15
  0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:sg]}],
16
- 1 => [{:mday => 1, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:sg]}],
16
+ 1 => [{:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:sg]},
17
+ {:mday => 1, :function => "lunar_to_solar(year, month, day, region)", :function_arguments => [:year, :month, :day, :region], :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Chinese New Year", :regions => [:sg]},
18
+ {:mday => 2, :function => "lunar_to_solar(year, month, day, region)", :function_arguments => [:year, :month, :day, :region], :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Chinese New Year", :regions => [:sg]}],
17
19
  2 => [{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:sg]},
18
20
  {:mday => 15, :type => :informal, :name => "Total Defence Day", :regions => [:sg]}],
19
- 5 => [{:mday => 1, :name => "Labour Day", :regions => [:sg]}],
20
- 8 => [{:mday => 9, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "National Day", :regions => [:sg]}],
21
- 12 => [{:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:sg]}]
21
+ 3 => [{:mday => 31, :year_ranges => { :limited => [2025] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Puasa", :regions => [:sg]},
22
+ {:mday => 21, :year_ranges => { :limited => [2026] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Puasa", :regions => [:sg]}],
23
+ 4 => [{:mday => 22, :year_ranges => { :limited => [2023] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Puasa", :regions => [:sg]},
24
+ {:mday => 10, :year_ranges => { :limited => [2024] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Puasa", :regions => [:sg]}],
25
+ 5 => [{:mday => 1, :name => "Labour Day", :regions => [:sg]},
26
+ {:mday => 10, :year_ranges => { :limited => [2017] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Vesak Day", :regions => [:sg]},
27
+ {:mday => 29, :year_ranges => { :limited => [2018] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Vesak Day", :regions => [:sg]},
28
+ {:mday => 19, :year_ranges => { :limited => [2019] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Vesak Day", :regions => [:sg]},
29
+ {:mday => 7, :year_ranges => { :limited => [2020] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Vesak Day", :regions => [:sg]},
30
+ {:mday => 26, :year_ranges => { :limited => [2021] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Vesak Day", :regions => [:sg]},
31
+ {:mday => 15, :year_ranges => { :limited => [2022] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Vesak Day", :regions => [:sg]},
32
+ {:mday => 22, :year_ranges => { :limited => [2024] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Vesak Day", :regions => [:sg]},
33
+ {:mday => 12, :year_ranges => { :limited => [2025] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Vesak Day", :regions => [:sg]},
34
+ {:mday => 31, :year_ranges => { :limited => [2026] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Vesak Day", :regions => [:sg]},
35
+ {:mday => 24, :year_ranges => { :limited => [2020] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Puasa", :regions => [:sg]},
36
+ {:mday => 13, :year_ranges => { :limited => [2021] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Puasa", :regions => [:sg]},
37
+ {:mday => 3, :year_ranges => { :limited => [2022] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Puasa", :regions => [:sg]},
38
+ {:mday => 27, :year_ranges => { :limited => [2026] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Haji", :regions => [:sg]}],
39
+ 6 => [{:mday => 2, :year_ranges => { :limited => [2023] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Vesak Day", :regions => [:sg]},
40
+ {:mday => 25, :year_ranges => { :limited => [2017] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Puasa", :regions => [:sg]},
41
+ {:mday => 15, :year_ranges => { :limited => [2018] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Puasa", :regions => [:sg]},
42
+ {:mday => 5, :year_ranges => { :limited => [2019] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Puasa", :regions => [:sg]},
43
+ {:mday => 29, :year_ranges => { :limited => [2023] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Haji", :regions => [:sg]},
44
+ {:mday => 17, :year_ranges => { :limited => [2024] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Haji", :regions => [:sg]},
45
+ {:mday => 7, :year_ranges => { :limited => [2025] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Haji", :regions => [:sg]}],
46
+ 7 => [{:mday => 31, :year_ranges => { :limited => [2020] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Haji", :regions => [:sg]},
47
+ {:mday => 20, :year_ranges => { :limited => [2021] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Haji", :regions => [:sg]},
48
+ {:mday => 10, :year_ranges => { :limited => [2022] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Haji", :regions => [:sg]}],
49
+ 8 => [{:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "National Day", :regions => [:sg]},
50
+ {:mday => 22, :year_ranges => { :limited => [2018] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Haji", :regions => [:sg]},
51
+ {:mday => 11, :year_ranges => { :limited => [2019] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Haji", :regions => [:sg]}],
52
+ 9 => [{:mday => 1, :year_ranges => { :limited => [2017] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Hari Raya Haji", :regions => [:sg]}],
53
+ 10 => [{:mday => 18, :year_ranges => { :limited => [2017] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Deepavali", :regions => [:sg]},
54
+ {:mday => 27, :year_ranges => { :limited => [2019] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Deepavali", :regions => [:sg]},
55
+ {:mday => 24, :year_ranges => { :limited => [2022] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Deepavali", :regions => [:sg]},
56
+ {:mday => 31, :year_ranges => { :limited => [2024] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Deepavali", :regions => [:sg]},
57
+ {:mday => 20, :year_ranges => { :limited => [2025] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Deepavali", :regions => [:sg]}],
58
+ 11 => [{:mday => 6, :year_ranges => { :limited => [2018] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Deepavali", :regions => [:sg]},
59
+ {:mday => 14, :year_ranges => { :limited => [2020] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Deepavali", :regions => [:sg]},
60
+ {:mday => 4, :year_ranges => { :limited => [2021] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Deepavali", :regions => [:sg]},
61
+ {:mday => 12, :year_ranges => { :limited => [2023] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Deepavali", :regions => [:sg]},
62
+ {:mday => 8, :year_ranges => { :limited => [2026] },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Deepavali", :regions => [:sg]}],
63
+ 12 => [{:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:sg]}]
22
64
  }
23
65
  end
24
66
 
@@ -502,6 +502,7 @@ module Holidays
502
502
  kr: KOREAN_LUNAR_YEAR_INFO,
503
503
  vn: VIETNAMESE_LUNAR_YEAR_INFO,
504
504
  hk: CHINESE_LUNAR_YEAR_INFO,
505
+ sg: CHINESE_LUNAR_YEAR_INFO,
505
506
  }.freeze
506
507
 
507
508
  # Provides number of days per lunar month type. Lunar months
@@ -1,3 +1,3 @@
1
1
  module Holidays
2
- VERSION = '11.1.0'
2
+ VERSION = '11.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holidays
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.1.0
4
+ version: 11.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Dunae