date-holiday 0.0.4 → 0.0.5

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.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/date/holiday.rb +14 -12
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b8a1d6b9395a7db9f994b8965e0cf72c36d45f43
4
- data.tar.gz: 5adcd575df78abe009856e75e7879a03895803ff
2
+ SHA256:
3
+ metadata.gz: d038eac10fcdf236ef718788ab47203a2c1ef255301eccbd1bb181194ae2006e
4
+ data.tar.gz: e76f6b855978ec4a6bdafface5089070541d54dd0c8c8a2c442551e64df5a646
5
5
  SHA512:
6
- metadata.gz: 2f82bd040e4276c8d185ec59388e11e32e89d70d8dbff8c56af51787c806cac53848466d52788a731de6f519bbc6384eca76eacbcb75e96bc3b567ea3d849961
7
- data.tar.gz: 705af3448c2dea51f382dabd5eae5d4ae7e564ea84458173b7028fb41ad062fc0b054f56e99786b15a13f2d773a601ae780c2366a8dc64b6f34bc285fae1fd71
6
+ metadata.gz: 902d309cca7e3d9f17c3fec5fe482626568bab346e45226a42b335f3dda37ff4627a196cbc364d6ce216a840f14c87fd4a371cbdf52303fa3f708af67213758c
7
+ data.tar.gz: 1977cb0225b47aa373cd191031f6a12b8a39b4fc5c477f299148ab8ccb277fdf34fccce31fd86ead5c0627bd6eabd0f4c2936bb283874c9fa807d9377b04561b
data/lib/date/holiday.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # date/holiday.rb: Written by Tadayoshi Funaba 1998-2006,2014,2018
2
- # $Id: holiday.rb,v 2.20 2018/07/05 01:11:49 tadf Exp $
2
+ # $Id: holiday.rb,v 2.21 2018-12-08 23:05:08+09 tadf Exp $
3
3
 
4
4
  require 'date'
5
5
 
@@ -136,9 +136,18 @@ class Date
136
136
  jd == _aeq(year)
137
137
  end
138
138
 
139
- private :veq?, :aeq?
139
+ def extra?
140
+ jd == 2436669 || # 1959-04-10 # 16
141
+ jd == 2447582 || # 1989-02-24
142
+ jd == 2448208 || # 1990-11-12
143
+ jd == 2449148 || # 1993-06-09
144
+ jd == 2458605 || # 2019-05-01
145
+ jd == 2458779 # 2019-10-22
146
+ end
147
+
148
+ private :veq?, :aeq?, :extra?
140
149
 
141
- def nhol2? () fixed? || float? || veq? || aeq? end
150
+ def nhol2? () fixed? || float? || veq? || aeq? || extra? end
142
151
 
143
152
  unless Date.new.respond_to?(:sunday?)
144
153
  def sunday? () wday == 0 end
@@ -175,18 +184,11 @@ class Date
175
184
  end
176
185
  end
177
186
 
178
- def nholx?
179
- jd == 2436669 || # 1959-04-10 # 16
180
- jd == 2447582 || # 1989-02-24
181
- jd == 2448208 || # 1990-11-12
182
- jd == 2449148 # 1993-06-09
183
- end
184
-
185
- private :nhol32?, :nhol33?, :nholx?
187
+ private :nhol32?, :nhol33?
186
188
 
187
189
  def national_holiday?
188
190
  d = if julian? then self.gregorian else self end
189
- d.instance_eval do nhol2? || nhol32? || nhol33? || nholx? end
191
+ d.instance_eval do nhol2? || nhol32? || nhol33? end
190
192
  end
191
193
 
192
194
  def qfixed?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: date-holiday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tadayoshi Funaba
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-05 00:00:00.000000000 Z
11
+ date: 2018-12-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: tadf@funaba.org
@@ -30,7 +30,7 @@ files:
30
30
  - lib/date/holiday.rb
31
31
  homepage: http://www.funaba.org/code
32
32
  licenses:
33
- - BSD 2-Clause
33
+ - BSD-2-Clause
34
34
  metadata: {}
35
35
  post_install_message:
36
36
  rdoc_options: []
@@ -48,7 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  version: '0'
49
49
  requirements: []
50
50
  rubyforge_project: tadf
51
- rubygems_version: 2.5.2.1
51
+ rubygems_version: 2.7.6
52
52
  signing_key:
53
53
  specification_version: 4
54
54
  summary: determination of holiday