holidays 5.4.0 → 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Makefile +1 -1
  4. data/README.md +6 -6
  5. data/Rakefile +7 -8
  6. data/lib/generated_definitions/REGIONS.rb +3 -1
  7. data/lib/generated_definitions/ar.rb +0 -6
  8. data/lib/generated_definitions/at.rb +0 -6
  9. data/lib/generated_definitions/au.rb +6 -9
  10. data/lib/generated_definitions/be_fr.rb +0 -6
  11. data/lib/generated_definitions/be_nl.rb +0 -6
  12. data/lib/generated_definitions/bg.rb +0 -6
  13. data/lib/generated_definitions/br.rb +0 -6
  14. data/lib/generated_definitions/ca.rb +0 -6
  15. data/lib/generated_definitions/ch.rb +0 -6
  16. data/lib/generated_definitions/cl.rb +0 -6
  17. data/lib/generated_definitions/cr.rb +0 -6
  18. data/lib/generated_definitions/cz.rb +0 -6
  19. data/lib/generated_definitions/de.rb +0 -6
  20. data/lib/generated_definitions/dk.rb +0 -6
  21. data/lib/generated_definitions/ecb_target.rb +0 -6
  22. data/lib/generated_definitions/el.rb +0 -6
  23. data/lib/generated_definitions/es.rb +0 -6
  24. data/lib/generated_definitions/europe.rb +0 -6
  25. data/lib/generated_definitions/federal_reserve.rb +0 -6
  26. data/lib/generated_definitions/fedex.rb +0 -6
  27. data/lib/generated_definitions/fi.rb +0 -6
  28. data/lib/generated_definitions/fr.rb +0 -6
  29. data/lib/generated_definitions/gb.rb +0 -6
  30. data/lib/generated_definitions/hk.rb +0 -6
  31. data/lib/generated_definitions/hr.rb +0 -6
  32. data/lib/generated_definitions/hu.rb +0 -6
  33. data/lib/generated_definitions/ie.rb +0 -6
  34. data/lib/generated_definitions/is.rb +0 -6
  35. data/lib/generated_definitions/it.rb +0 -6
  36. data/lib/generated_definitions/jp.rb +0 -6
  37. data/lib/generated_definitions/kr.rb +15 -225
  38. data/lib/generated_definitions/li.rb +0 -6
  39. data/lib/generated_definitions/lt.rb +0 -6
  40. data/lib/generated_definitions/lu.rb +0 -6
  41. data/lib/generated_definitions/ma.rb +0 -6
  42. data/lib/generated_definitions/mx.rb +0 -6
  43. data/lib/generated_definitions/my.rb +0 -6
  44. data/lib/generated_definitions/nerc.rb +0 -6
  45. data/lib/generated_definitions/nl.rb +0 -6
  46. data/lib/generated_definitions/no.rb +0 -6
  47. data/lib/generated_definitions/north_america.rb +0 -6
  48. data/lib/generated_definitions/nyse.rb +1 -7
  49. data/lib/generated_definitions/nz.rb +0 -6
  50. data/lib/generated_definitions/pe.rb +0 -6
  51. data/lib/generated_definitions/ph.rb +0 -6
  52. data/lib/generated_definitions/pl.rb +0 -6
  53. data/lib/generated_definitions/pt.rb +0 -6
  54. data/lib/generated_definitions/ro.rb +0 -6
  55. data/lib/generated_definitions/scandinavia.rb +0 -6
  56. data/lib/generated_definitions/se.rb +0 -6
  57. data/lib/generated_definitions/sg.rb +0 -6
  58. data/lib/generated_definitions/si.rb +0 -6
  59. data/lib/generated_definitions/sk.rb +0 -6
  60. data/lib/generated_definitions/tn.rb +0 -6
  61. data/lib/generated_definitions/united_nations.rb +0 -6
  62. data/lib/generated_definitions/ups.rb +0 -6
  63. data/lib/generated_definitions/us.rb +0 -6
  64. data/lib/generated_definitions/ve.rb +0 -6
  65. data/lib/generated_definitions/vi.rb +5 -10
  66. data/lib/generated_definitions/za.rb +0 -6
  67. data/lib/holidays.rb +0 -1
  68. data/lib/holidays/date_calculator/lunar_date.rb +371 -0
  69. data/lib/holidays/definition/context/function_processor.rb +20 -15
  70. data/lib/holidays/definition/context/generator.rb +0 -6
  71. data/lib/holidays/definition/context/load.rb +29 -0
  72. data/lib/holidays/definition/context/merger.rb +0 -4
  73. data/lib/holidays/definition/generator/regions.rb +50 -0
  74. data/lib/holidays/definition/repository/cache.rb +20 -7
  75. data/lib/holidays/definition/repository/proc_result_cache.rb +1 -1
  76. data/lib/holidays/definition/repository/regions.rb +23 -13
  77. data/lib/holidays/definition/validator/custom_method.rb +1 -1
  78. data/lib/holidays/definition/validator/region.rb +2 -9
  79. data/lib/holidays/factory/date_calculator.rb +5 -0
  80. data/lib/holidays/factory/definition.rb +17 -1
  81. data/lib/holidays/factory/finder.rb +1 -1
  82. data/lib/holidays/finder/context/between.rb +3 -0
  83. data/lib/holidays/finder/context/parse_options.rb +53 -52
  84. data/lib/holidays/finder/context/search.rb +23 -6
  85. data/lib/holidays/finder/rules/in_region.rb +1 -1
  86. data/lib/holidays/load_all_definitions.rb +9 -0
  87. data/lib/holidays/version.rb +1 -1
  88. data/test/data/test_invalid_region.rb +15 -0
  89. data/test/data/test_region.rb +15 -0
  90. data/test/defs/test_defs_au.rb +11 -1
  91. data/test/defs/test_defs_kr.rb +15 -12
  92. data/test/defs/test_defs_nyse.rb +5 -0
  93. data/test/defs/test_defs_vi.rb +6 -4
  94. data/test/holidays/date_calculator/test_lunar_date.rb +89 -0
  95. data/test/holidays/definition/context/test_function_processor.rb +47 -23
  96. data/test/holidays/definition/context/test_generator.rb +3 -3
  97. data/test/holidays/definition/context/test_load.rb +37 -0
  98. data/test/holidays/definition/generator/test_regions.rb +97 -0
  99. data/test/holidays/definition/repository/test_cache.rb +47 -6
  100. data/test/holidays/definition/repository/test_proc_result_cache.rb +7 -0
  101. data/test/holidays/definition/repository/test_regions.rb +31 -13
  102. data/test/holidays/definition/validator/test_custom_method.rb +5 -0
  103. data/test/holidays/definition/validator/test_region.rb +7 -12
  104. data/test/holidays/factory/test_date_calculator.rb +5 -0
  105. data/test/holidays/factory/test_definition.rb +9 -0
  106. data/test/holidays/finder/context/test_parse_options.rb +102 -33
  107. data/test/holidays/finder/context/test_search.rb +45 -16
  108. data/test/integration/test_available_regions.rb +1 -1
  109. data/test/integration/test_custom_year_range_holidays.rb +0 -1
  110. data/test/integration/test_holidays.rb +3 -3
  111. data/test/integration/test_multiple_regions.rb +0 -1
  112. metadata +16 -3
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/my.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/my'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module MY # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/nerc.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/nerc'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module NERC # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/nl.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/nl'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module NL # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/no.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/no'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module NO # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/ca.yaml, definitions/mx.yaml, definitions/us.yaml, definitions/north_america_informal.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/north_america'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module NORTH_AMERICA # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/nyse.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/nyse'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module NYSE # :nodoc:
15
9
  def self.defined_regions
@@ -19,7 +13,7 @@ module Holidays
19
13
  def self.holidays_by_month
20
14
  {
21
15
  0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:nyse]}],
22
- 1 => [{:mday => 1, :name => "New Year's Day", :regions => [:nyse]},
16
+ 1 => [{:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:nyse]},
23
17
  {:wday => 1, :week => 3, :name => "Martin Luther King, Jr. Day", :regions => [:nyse]}],
24
18
  2 => [{:wday => 1, :week => 3, :name => "Presidents' Day", :regions => [:nyse]}],
25
19
  5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:nyse]}],
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/nz.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/nz'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module NZ # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/pe.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/pe'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module PE # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/ph.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/ph'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module PH # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/pl.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/pl'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module PL # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/pt.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/pt'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module PT # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/ro.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/ro'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module RO # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/dk.yaml, definitions/is.yaml, definitions/no.yaml, definitions/se.yaml, definitions/fi.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/scandinavia'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module SCANDINAVIA # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/se.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/se'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module SE # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/sg.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/sg'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module SG # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/si.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/si'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module SI # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/sk.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/sk'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module SK # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/tn.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/tn'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module TN # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/united_nations.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/united_nations'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module UNITED_NATIONS # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/ups.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/ups'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module UPS # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/us.yaml, definitions/north_america_informal.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/us'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module US # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/ve.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/ve'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module VE # :nodoc:
15
9
  def self.defined_regions
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/vi.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/vi'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module VI # :nodoc:
15
9
  def self.defined_regions
@@ -18,10 +12,11 @@ module Holidays
18
12
 
19
13
  def self.holidays_by_month
20
14
  {
21
- 1 => [{:mday => 1, :name => "New Year", :regions => [:vi]}],
22
- 4 => [{:mday => 30, :name => "Liberation Day", :regions => [:vi]}],
23
- 5 => [{:mday => 1, :name => "International Workers' Day", :regions => [:vi]}],
24
- 9 => [{:mday => 2, :name => "National Day", :regions => [:vi]}]
15
+ 1 => [{:mday => 1, :name => "Tết dương lịch", :regions => [:vi]}],
16
+ 3 => [{:mday => 10, :function => "lunar_to_solar(year, month, day, region)", :function_arguments => [:year, :month, :day, :region], :name => "Giỗ tổ Hùng Vương", :regions => [:vi]}],
17
+ 4 => [{:mday => 30, :name => "Ngày Giải phóng miền Nam, thống nhất đất nước", :regions => [:vi]}],
18
+ 5 => [{:mday => 1, :name => "Ngày Quốc tế Lao động", :regions => [:vi]}],
19
+ 9 => [{:mday => 2, :name => "Quốc khánh", :regions => [:vi]}]
25
20
  }
26
21
  end
27
22
 
@@ -4,12 +4,6 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: definitions/za.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
8
- # Holiday gem:
9
- #
10
- # require 'holidays'
11
- # require 'generated_definitions/za'
12
- #
13
7
  # All the definitions are available at https://github.com/holidays/holidays
14
8
  module ZA # :nodoc:
15
9
  def self.defined_regions
@@ -80,7 +80,6 @@ module Holidays
80
80
  end
81
81
 
82
82
  def available_regions
83
- require "#{DEFINITIONS_PATH}/REGIONS"
84
83
  Holidays::REGIONS
85
84
  end
86
85
 
@@ -0,0 +1,371 @@
1
+ module Holidays
2
+ module DateCalculator
3
+ # Copied from https://github.com/sunsidew/ruby_lunardate
4
+ # Graciously allowed by JeeWoong Yang (https://github.com/sunsidew)
5
+ class LunarDate
6
+ attr_accessor :year, :month, :day
7
+
8
+ def to_solar(year, month, day, region)
9
+ days = 0
10
+ year_diff = year - 1900
11
+ year_info = CALENDAR_YEAR_INFO_MAP[region]
12
+
13
+ year_diff.times do |year_idx|
14
+ days += year_info[year_idx][0]
15
+ end
16
+
17
+ (month - 1).times do |month_idx|
18
+ total, _normal, _leap = lunardays_for_type(year_info[year_diff][month_idx + 1])
19
+ days += total
20
+ end
21
+
22
+ days += (day - 1)
23
+
24
+ SOLAR_START_DATE + days
25
+ end
26
+
27
+ def lunardays_for_type(month_type)
28
+ LUNARDAYS_FOR_MONTHTYPE[month_type]
29
+ end
30
+
31
+ def to_s
32
+ format('%4d%02d%02d', year, month, day)
33
+ end
34
+
35
+ private
36
+
37
+ VIETNAMESE_LUNAR_YEAR_INFO = [
38
+ [384, 1, 2, 1, 1, 2, 1, 2, 4, 2, 2, 1, 2].freeze,
39
+ [354, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
40
+ [355, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2].freeze,
41
+ [383, 1, 2, 1, 2, 3, 2, 1, 1, 2, 2, 1, 2].freeze,
42
+ [354, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1].freeze,
43
+ [355, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
44
+ [384, 1, 2, 2, 5, 1, 2, 1, 2, 1, 2, 1, 2].freeze,
45
+ [354, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
46
+ [355, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2].freeze,
47
+ [384, 1, 4, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2].freeze,
48
+ [354, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
49
+ [384, 2, 1, 2, 1, 1, 4, 1, 2, 2, 1, 2, 2].freeze,
50
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2].freeze,
51
+ [354, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2].freeze,
52
+ [384, 2, 2, 1, 2, 4, 1, 2, 1, 2, 1, 1, 2].freeze,
53
+ [355, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2].freeze,
54
+ [354, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
55
+ [384, 2, 3, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1].freeze,
56
+ [355, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2].freeze,
57
+ [384, 1, 2, 1, 1, 2, 1, 4, 2, 2, 1, 2, 2].freeze,
58
+ [354, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2].freeze,
59
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2].freeze,
60
+ [384, 2, 1, 2, 2, 3, 2, 1, 1, 2, 1, 2, 2].freeze,
61
+ [354, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2].freeze,
62
+ [354, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1].freeze,
63
+ [385, 2, 1, 2, 4, 2, 1, 2, 2, 1, 2, 1, 2].freeze,
64
+ [354, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
65
+ [355, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
66
+ [384, 1, 4, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2].freeze,
67
+ [354, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2].freeze,
68
+ [383, 1, 2, 2, 1, 1, 4, 1, 2, 1, 2, 2, 1].freeze,
69
+ [354, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
70
+ [355, 2, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2].freeze,
71
+ [384, 1, 2, 2, 1, 6, 1, 2, 1, 2, 1, 1, 2].freeze,
72
+ [355, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2].freeze,
73
+ [354, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
74
+ [384, 2, 1, 5, 1, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
75
+ [354, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1].freeze,
76
+ [384, 2, 2, 1, 1, 2, 1, 5, 1, 2, 2, 1, 2].freeze,
77
+ [354, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
78
+ [354, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
79
+ [384, 2, 2, 1, 2, 2, 5, 1, 1, 2, 1, 2, 1].freeze,
80
+ [355, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2].freeze,
81
+ [355, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2].freeze,
82
+ [384, 1, 1, 2, 5, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
83
+ [354, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2].freeze,
84
+ [354, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2].freeze,
85
+ [384, 2, 4, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2].freeze,
86
+ [354, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
87
+ [384, 2, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2].freeze,
88
+ [354, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
89
+ [355, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2].freeze,
90
+ [384, 1, 2, 1, 2, 5, 2, 1, 2, 1, 2, 1, 2].freeze,
91
+ [355, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2].freeze,
92
+ [354, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
93
+ [384, 2, 1, 5, 1, 1, 2, 1, 2, 1, 2, 2, 2].freeze,
94
+ [354, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2].freeze,
95
+ [384, 2, 1, 2, 1, 2, 1, 1, 4, 2, 1, 2, 2].freeze,
96
+ [354, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
97
+ [354, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1].freeze,
98
+ [384, 2, 1, 2, 1, 2, 4, 2, 1, 2, 1, 2, 1].freeze,
99
+ [355, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2].freeze,
100
+ [354, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
101
+ [384, 2, 1, 2, 3, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
102
+ [355, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2].freeze,
103
+ [354, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2].freeze,
104
+ [383, 1, 2, 4, 2, 1, 1, 2, 1, 1, 2, 2, 1].freeze,
105
+ [355, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
106
+ [384, 1, 2, 2, 1, 2, 1, 4, 2, 1, 2, 1, 2].freeze,
107
+ [354, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
108
+ [355, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2].freeze,
109
+ [384, 1, 2, 1, 1, 4, 2, 1, 2, 2, 2, 1, 2].freeze,
110
+ [354, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
111
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1].freeze,
112
+ [384, 2, 2, 1, 4, 1, 2, 1, 1, 2, 2, 1, 2].freeze,
113
+ [354, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2].freeze,
114
+ [384, 2, 2, 1, 2, 1, 2, 1, 4, 2, 1, 1, 2].freeze,
115
+ [354, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1].freeze,
116
+ [355, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
117
+ [384, 2, 1, 1, 2, 1, 6, 1, 2, 2, 1, 2, 1].freeze,
118
+ [355, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
119
+ [354, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2].freeze,
120
+ [384, 2, 1, 2, 3, 2, 1, 1, 2, 2, 1, 2, 2].freeze,
121
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2].freeze,
122
+ [384, 2, 1, 2, 2, 1, 1, 2, 1, 1, 4, 2, 2].freeze,
123
+ [354, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2].freeze,
124
+ [354, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1].freeze,
125
+ [385, 2, 1, 2, 2, 1, 4, 2, 2, 1, 2, 1, 2].freeze,
126
+ [354, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
127
+ [355, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
128
+ [384, 1, 2, 1, 1, 4, 1, 2, 2, 1, 2, 2, 2].freeze,
129
+ [354, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2].freeze,
130
+ [354, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2].freeze,
131
+ [383, 1, 2, 4, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
132
+ [355, 2, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2].freeze,
133
+ [384, 1, 2, 2, 1, 2, 2, 1, 4, 2, 1, 1, 2].freeze,
134
+ [355, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2].freeze,
135
+ [354, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
136
+ [384, 2, 1, 1, 2, 3, 2, 2, 1, 2, 2, 2, 1].freeze,
137
+ [354, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1].freeze,
138
+ [354, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1].freeze,
139
+ [384, 2, 2, 2, 3, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
140
+ [354, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
141
+ [355, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2].freeze,
142
+ [384, 1, 4, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2].freeze,
143
+ [354, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1].freeze,
144
+ [385, 2, 1, 2, 1, 2, 1, 4, 2, 2, 1, 2, 2].freeze,
145
+ [354, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2].freeze,
146
+ [354, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2].freeze,
147
+ [384, 2, 2, 1, 1, 4, 1, 2, 1, 2, 1, 2, 2].freeze,
148
+ [354, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
149
+ [354, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
150
+ [384, 2, 1, 6, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
151
+ [355, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2].freeze,
152
+ [384, 1, 2, 1, 2, 1, 2, 1, 2, 4, 2, 1, 2].freeze,
153
+ [354, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1].freeze,
154
+ [355, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
155
+ [355, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2].freeze,
156
+ [354, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2].freeze,
157
+ [354, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
158
+ [384, 2, 1, 2, 4, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
159
+ [354, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1].freeze,
160
+ [355, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2].freeze,
161
+ [384, 1, 4, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2].freeze,
162
+ [354, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
163
+ [384, 2, 1, 2, 1, 1, 4, 2, 1, 2, 2, 2, 1].freeze,
164
+ [355, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2].freeze,
165
+ [354, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2].freeze,
166
+ [383, 1, 2, 2, 1, 4, 1, 2, 1, 1, 2, 2, 1].freeze,
167
+ [355, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2].freeze,
168
+ [354, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1].freeze,
169
+ [384, 2, 1, 4, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
170
+ [355, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2].freeze,
171
+ [384, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 4, 2].freeze,
172
+ [354, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
173
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2].freeze,
174
+ [384, 2, 2, 1, 2, 1, 5, 1, 1, 2, 2, 1, 2].freeze,
175
+ [354, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2].freeze,
176
+ [354, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1].freeze,
177
+ [384, 2, 2, 1, 2, 4, 2, 1, 2, 1, 2, 1, 1].freeze,
178
+ [355, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
179
+ [355, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2].freeze,
180
+ [384, 1, 4, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2].freeze,
181
+ [354, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2].freeze,
182
+ [384, 2, 1, 2, 1, 1, 2, 3, 2, 1, 2, 2, 2].freeze,
183
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2].freeze,
184
+ [354, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2].freeze,
185
+ [384, 2, 1, 2, 2, 5, 1, 2, 1, 1, 2, 1, 2].freeze,
186
+ [354, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1].freeze,
187
+ [355, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1].freeze
188
+ ].freeze
189
+
190
+ KOREAN_LUNAR_YEAR_INFO = [
191
+ [384, 1, 2, 1, 1, 2, 1, 2, 4, 2, 2, 1, 2].freeze,
192
+ [354, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
193
+ [355, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2].freeze,
194
+ [383, 1, 2, 1, 2, 3, 2, 1, 1, 2, 2, 1, 2].freeze,
195
+ [354, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1].freeze,
196
+ [355, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
197
+ [384, 1, 2, 2, 5, 1, 2, 1, 2, 1, 2, 1, 2].freeze,
198
+ [354, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
199
+ [355, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2].freeze,
200
+ [384, 1, 4, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2].freeze,
201
+ [354, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
202
+ [384, 2, 1, 2, 1, 1, 4, 1, 2, 2, 1, 2, 2].freeze,
203
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2].freeze,
204
+ [354, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2].freeze,
205
+ [384, 2, 2, 1, 2, 4, 1, 2, 1, 2, 1, 1, 2].freeze,
206
+ [355, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2].freeze,
207
+ [354, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
208
+ [384, 2, 3, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1].freeze,
209
+ [355, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2].freeze,
210
+ [384, 1, 2, 1, 1, 2, 1, 4, 2, 2, 1, 2, 2].freeze,
211
+ [354, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2].freeze,
212
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2].freeze,
213
+ [384, 2, 1, 2, 2, 3, 2, 1, 1, 2, 1, 2, 2].freeze,
214
+ [354, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2].freeze,
215
+ [354, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1].freeze,
216
+ [385, 2, 1, 2, 4, 2, 1, 2, 2, 1, 2, 1, 2].freeze,
217
+ [354, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
218
+ [355, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
219
+ [384, 1, 4, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2].freeze,
220
+ [354, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2].freeze,
221
+ [383, 1, 2, 2, 1, 1, 4, 1, 2, 1, 2, 2, 1].freeze,
222
+ [354, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
223
+ [355, 2, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2].freeze,
224
+ [384, 1, 2, 2, 1, 6, 1, 2, 1, 2, 1, 1, 2].freeze,
225
+ [355, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2].freeze,
226
+ [354, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
227
+ [384, 2, 1, 5, 1, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
228
+ [354, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1].freeze,
229
+ [384, 2, 2, 1, 1, 2, 1, 5, 1, 2, 2, 1, 2].freeze,
230
+ [354, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
231
+ [354, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
232
+ [384, 2, 2, 1, 2, 2, 5, 1, 1, 2, 1, 2, 1].freeze,
233
+ [355, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2].freeze,
234
+ [355, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2].freeze,
235
+ [384, 1, 1, 2, 5, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
236
+ [354, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2].freeze,
237
+ [354, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2].freeze,
238
+ [384, 2, 4, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2].freeze,
239
+ [354, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
240
+ [384, 2, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2].freeze,
241
+ [354, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
242
+ [355, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2].freeze,
243
+ [384, 1, 2, 1, 2, 5, 2, 1, 2, 1, 2, 1, 2].freeze,
244
+ [355, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2].freeze,
245
+ [354, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
246
+ [384, 2, 1, 5, 1, 1, 2, 1, 2, 1, 2, 2, 2].freeze,
247
+ [354, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2].freeze,
248
+ [384, 2, 1, 2, 1, 2, 1, 1, 4, 2, 1, 2, 2].freeze,
249
+ [354, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
250
+ [354, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1].freeze,
251
+ [384, 2, 1, 2, 1, 2, 4, 2, 1, 2, 1, 2, 1].freeze,
252
+ [355, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2].freeze,
253
+ [354, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
254
+ [384, 2, 1, 2, 3, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
255
+ [355, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2].freeze,
256
+ [354, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2].freeze,
257
+ [383, 1, 2, 4, 2, 1, 1, 2, 1, 1, 2, 2, 1].freeze,
258
+ [355, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
259
+ [384, 1, 2, 2, 1, 2, 1, 4, 2, 1, 2, 1, 2].freeze,
260
+ [354, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
261
+ [355, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2].freeze,
262
+ [384, 1, 2, 1, 1, 4, 2, 1, 2, 2, 2, 1, 2].freeze,
263
+ [354, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
264
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1].freeze,
265
+ [384, 2, 2, 1, 4, 1, 2, 1, 1, 2, 2, 1, 2].freeze,
266
+ [354, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2].freeze,
267
+ [384, 2, 2, 1, 2, 1, 2, 1, 4, 2, 1, 1, 2].freeze,
268
+ [354, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1].freeze,
269
+ [355, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
270
+ [384, 2, 1, 1, 2, 1, 6, 1, 2, 2, 1, 2, 1].freeze,
271
+ [355, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
272
+ [354, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2].freeze,
273
+ [384, 2, 1, 2, 3, 2, 1, 1, 2, 2, 1, 2, 2].freeze,
274
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2].freeze,
275
+ [384, 2, 1, 2, 2, 1, 1, 2, 1, 1, 4, 2, 2].freeze,
276
+ [354, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2].freeze,
277
+ [354, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1].freeze,
278
+ [385, 2, 1, 2, 2, 1, 4, 2, 2, 1, 2, 1, 2].freeze,
279
+ [354, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
280
+ [355, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
281
+ [384, 1, 2, 1, 1, 4, 1, 2, 2, 1, 2, 2, 2].freeze,
282
+ [354, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2].freeze,
283
+ [354, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2].freeze,
284
+ [383, 1, 2, 4, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
285
+ [355, 2, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2].freeze,
286
+ [384, 1, 2, 2, 1, 2, 2, 1, 4, 2, 1, 1, 2].freeze,
287
+ [355, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2].freeze,
288
+ [354, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
289
+ [384, 2, 1, 1, 2, 3, 2, 2, 1, 2, 2, 2, 1].freeze,
290
+ [354, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1].freeze,
291
+ [354, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1].freeze,
292
+ [384, 2, 2, 2, 3, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
293
+ [354, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
294
+ [355, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2].freeze,
295
+ [384, 1, 4, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2].freeze,
296
+ [354, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1].freeze,
297
+ [385, 2, 1, 2, 1, 2, 1, 4, 2, 2, 1, 2, 2].freeze,
298
+ [354, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2].freeze,
299
+ [354, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2].freeze,
300
+ [384, 2, 2, 1, 1, 4, 1, 2, 1, 2, 1, 2, 2].freeze,
301
+ [354, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
302
+ [354, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
303
+ [384, 2, 1, 6, 2, 1, 2, 1, 1, 2, 1, 2, 1].freeze,
304
+ [355, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2].freeze,
305
+ [384, 1, 2, 1, 2, 1, 2, 1, 2, 4, 2, 1, 2].freeze,
306
+ [354, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1].freeze,
307
+ [355, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2].freeze,
308
+ [384, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 2, 2].freeze,
309
+ [354, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2].freeze,
310
+ [354, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
311
+ [384, 2, 1, 2, 4, 2, 1, 1, 2, 1, 2, 1, 2].freeze,
312
+ [354, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1].freeze,
313
+ [355, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2].freeze,
314
+ [384, 1, 4, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2].freeze,
315
+ [354, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1].freeze,
316
+ [384, 2, 1, 2, 1, 1, 4, 2, 1, 2, 2, 2, 1].freeze,
317
+ [355, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2].freeze,
318
+ [354, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2].freeze,
319
+ [383, 1, 2, 2, 1, 4, 1, 2, 1, 1, 2, 2, 1].freeze,
320
+ [355, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2].freeze,
321
+ [354, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1].freeze,
322
+ [384, 2, 1, 4, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
323
+ [355, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2].freeze,
324
+ [384, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 4, 2].freeze,
325
+ [354, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1].freeze,
326
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2].freeze,
327
+ [384, 2, 2, 1, 2, 1, 5, 1, 1, 2, 2, 1, 2].freeze,
328
+ [354, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2].freeze,
329
+ [354, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1].freeze,
330
+ [384, 2, 2, 1, 2, 4, 2, 1, 2, 1, 2, 1, 1].freeze,
331
+ [355, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1].freeze,
332
+ [355, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2].freeze,
333
+ [384, 1, 4, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2].freeze,
334
+ [354, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2].freeze,
335
+ [384, 2, 1, 2, 1, 1, 2, 3, 2, 1, 2, 2, 2].freeze,
336
+ [354, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2].freeze,
337
+ [354, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2].freeze,
338
+ [384, 2, 1, 2, 2, 5, 1, 2, 1, 1, 2, 1, 2].freeze,
339
+ [354, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1].freeze,
340
+ [355, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1].freeze
341
+ ].freeze
342
+
343
+ MAX_YEAR_NUMBER = 150
344
+
345
+ # Given the region, CALENDAR_YEAR_INFO_MAP looks up the date
346
+ # table and uses it in the calculation
347
+ CALENDAR_YEAR_INFO_MAP = {
348
+ kr: KOREAN_LUNAR_YEAR_INFO,
349
+ vi: VIETNAMESE_LUNAR_YEAR_INFO
350
+ }.freeze
351
+
352
+ # Provides number of days per lunar month type. Lunar months
353
+ # can be either 29 or 30 days long (29.5 days, rounded up or down).
354
+ # Keys 3 - 6 provide data for intercalary (leap month) occurrences.
355
+ # Format: [TOTAL, NORMAL, LEAP]
356
+ LUNARDAYS_FOR_MONTHTYPE = {
357
+ 1 => [29, 29, 0],
358
+ 2 => [30, 30, 0],
359
+ 3 => [58, 29, 29],
360
+ 4 => [59, 30, 29],
361
+ 5 => [59, 29, 30],
362
+ 6 => [60, 30, 30]
363
+ }.freeze
364
+
365
+ # Provides the reference point for the Gregorian calendar and is
366
+ # used in all calculations
367
+ SOLAR_START_DATE = Date.new(1900, 1, 31).freeze
368
+
369
+ end
370
+ end
371
+ end