jpdate 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c40cb6bf0cd3c18fe7c784aa316171dafecacbf
4
- data.tar.gz: 141db2482cd3218597eac2391fa6f6d5b9ad25b1
3
+ metadata.gz: 2b7d5735bd52468bdbfbdd7a08650dc36f5bcfd9
4
+ data.tar.gz: 858c6a0a70d6d64989ab70b8f67c058d05d54bd9
5
5
  SHA512:
6
- metadata.gz: b6eebba610fbd51c5d338190fe5c06e7835d0783bd03168627459afc823b7412c6eef699709b71e40b015366a28890364611b171f8ab6a5803e76dcc4085e5b6
7
- data.tar.gz: 458a39bf79d37c23e9430517722c80ae30b48ab7d1d8b217ca72d3d24151504744a6e2fa281e9bd76d143b15574e9d854b569f286887a408f15486d9fda5e9ed
6
+ metadata.gz: be1bc004ba0a1f2ba5a0f150d5d6a9778094d08d08b892c3435fa014728af7dd4bf4ab4a099b2d94eba670501ccf03fb6fd7d0fd85a3abbb9c77f2b085ebb189
7
+ data.tar.gz: 74bb2f92303b1cf5b620743cb66c25d9953f2e5d7c3b38b33e59566e13054c021e42de0e26efb45954dff5ea3a9387e3a08cb4bae318c2762faccfc05d16aad8
data/README.md CHANGED
@@ -12,11 +12,11 @@
12
12
  * 日本の暦は、明治6年・1873年1月1日より太陽暦で動いている。(それ以前は太陰暦)
13
13
  * jcal・JPDateは、太陽暦以降の祝日に関する法律に可能な限り準拠しようとしている。
14
14
 
15
- ##Installation
15
+ ##Installation インストール
16
16
 
17
17
  $ sudo gem install jpdate
18
18
 
19
- ##Usage(jcal)
19
+ ##Usage 使い方(jcal)
20
20
 
21
21
  Usage: jcal [options] [yyyy|mm] [yyyy|mm] [yyyy|mm]
22
22
 
@@ -36,7 +36,7 @@
36
36
  jcal -m6 2010 1 # Show monthly calendar from Jan.2010 to Jun.2010.
37
37
  jcal 2010 2 8 # Show monthly calendar from Feb.2010 to Aug.2010.
38
38
 
39
- ##Usage(JPDate, JPDate::Holiday, JPDate::Era)
39
+ ##Usage 使い方(JPDate, JPDate::Holiday, JPDate::Era)
40
40
 
41
41
  require 'jpdate'
42
42
 
@@ -74,7 +74,7 @@
74
74
  JPDate::Era.short_name_year(1989)
75
75
  => ["S64", "H01"]
76
76
 
77
- ##More Document
77
+ ##More Document さらなるドキュメント
78
78
 
79
79
  ###gemサーバーを起動する方法
80
80
  $ gem server -l
@@ -87,3 +87,11 @@
87
87
  $ cd ~/Desktop
88
88
  $ rdoc $(dirname `gem which jpdate`)
89
89
  $ open doc/index.html
90
+
91
+ ##Contributing 貢献
92
+
93
+ 1. フォークする。 ( https://github.com/[my-github-username]/sample/fork )
94
+ 2. フィーチャーブランチを作る。 (`git checkout -b my-new-feature`)
95
+ 3. 変更をコミットする。 (`git commit -am 'Add some feature'`)
96
+ 4. フィーチャーブランチにプッシュする。 (`git push origin my-new-feature`)
97
+ 5. プルリクエストを作る。
@@ -133,7 +133,7 @@ class JPDate < Date
133
133
  # JPDate::Holiday.list(2015) # => {#<Date: 2015-01-01 ((2457024j,0s,0n),+0s,2299161j)>=>"元旦", #<Date: 2015-01-12 ((2457035j,0s,0n),+0s,2299161j)>=>"成人の日", #<Date: 2015-02-11 ((2457065j,0s,0n),+0s,2299161j)>=>"建国記念日", #<Date: 2015-03-21 ((2457103j,0s,0n),+0s,2299161j)>=>"春分の日", #<Date: 2015-04-29 ((2457142j,0s,0n),+0s,2299161j)>=>"昭和の日", #<Date: 2015-05-03 ((2457146j,0s,0n),+0s,2299161j)>=>"憲法記念日", #<Date: 2015-05-04 ((2457147j,0s,0n),+0s,2299161j)>=>"みどりの日", #<Date: 2015-05-05 ((2457148j,0s,0n),+0s,2299161j)>=>"こどもの日", #<Date: 2015-05-06 ((2457149j,0s,0n),+0s,2299161j)>=>"振替休日", #<Date: 2015-07-20 ((2457224j,0s,0n),+0s,2299161j)>=>"海の日", #<Date: 2015-09-21 ((2457287j,0s,0n),+0s,2299161j)>=>"敬老の日", #<Date: 2015-09-22 ((2457288j,0s,0n),+0s,2299161j)>=>"国民の休日", #<Date: 2015-09-23 ((2457289j,0s,0n),+0s,2299161j)>=>"秋分の日", #<Date: 2015-10-12 ((2457308j,0s,0n),+0s,2299161j)>=>"体育の日", #<Date: 2015-11-03 ((2457330j,0s,0n),+0s,2299161j)>=>"文化の日", #<Date: 2015-11-23 ((2457350j,0s,0n),+0s,2299161j)>=>"勤労感謝の日", #<Date: 2015-12-23 ((2457380j,0s,0n),+0s,2299161j)>=>"天皇誕生日"}
134
134
  # JPDate::Holiday.list(1989..2014) # => ...中略...
135
135
  def self.list(range)
136
- range = range..range if range.class == Fixnum
136
+ range = range..range if range.class == Integer
137
137
  range.each {|y| new(y) unless @@years.include?(y)}
138
138
  Hash[@@holidays.sort].select {|k, v| range.include?(k.year)}
139
139
  end
@@ -144,7 +144,7 @@ class JPDate < Date
144
144
  @holidays = {}
145
145
  HOLIDAYS.select {|h| h[:term].include?(y)}.each do |h|
146
146
  date = case h[:day]
147
- when Fixnum then Date.new(y, h[:month], h[:day])
147
+ when Integer then Date.new(y, h[:month], h[:day])
148
148
  when String then send(*h[:day].split, y, h[:month])
149
149
  end
150
150
  @holidays[date] = h[:name]
@@ -4,5 +4,5 @@
4
4
  # class JPDateに統一しておく
5
5
 
6
6
  class JPDate < Date
7
- VERSION = "0.1.1"
7
+ VERSION = "0.1.2"
8
8
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jpdate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - zariganitosh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-19 00:00:00.000000000 Z
11
+ date: 2017-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.7'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  description: 明治6年1月1日以降の日本の祝日を出力可能なJPDateクラス
@@ -46,7 +46,7 @@ executables:
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
- - .gitignore
49
+ - ".gitignore"
50
50
  - Gemfile
51
51
  - LICENSE.txt
52
52
  - README.md
@@ -67,17 +67,17 @@ require_paths:
67
67
  - lib
68
68
  required_ruby_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - '>='
70
+ - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - '>='
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
79
  rubyforge_project:
80
- rubygems_version: 2.4.2
80
+ rubygems_version: 2.5.1
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: 日本の祝日を出力するJPDateクラス