month_date 0.0.1.1 → 0.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: 9ff789b8edd707bd4d2e57c40b5a8a8560a22c1f
4
- data.tar.gz: 9cf862c6e6cd2ad7e57d8c3862203d5c5042f831
3
+ metadata.gz: 6f142704b35a9ecd332585e86cc9f21459562d89
4
+ data.tar.gz: 69222e5a969dafb1502f51536410346d03d88dad
5
5
  SHA512:
6
- metadata.gz: 11d5ae0662bd28af2c6d49801c46329cf92b96fc728c210050153dd3b77b96c2d8147b848a8528df906cc45bdc0aa259049a77ab90f4ee830ccc5fe9805ec99d
7
- data.tar.gz: 126c996b8fe14dfaa1ec7840284b15b3b5a4bdec839089c98cb8cd5f31b0143898e710034017620aea78895604f645d01c068fa9c70d5714bbdb9312af279275
6
+ metadata.gz: 44b44e5e2c3dc91d826e1b702f1423931b09346b70a32e76c84e5a0eee8a4ab6dbd970eb5cdbb4a95515d96da887da80a8d1a53741b9c7f205c5a54c4b31ba51
7
+ data.tar.gz: ff73326be167db940f51f089fd30f3864c6d831ef128db54d1fc4f7b865db12bd5b1187ee869633ca1740dd37f1c95dad792d997658a9d326683c79d40de55b9
@@ -1,3 +1,3 @@
1
1
  module MonthDate
2
- VERSION = "0.0.1.1"
2
+ VERSION = "0.0.1.2"
3
3
  end
data/lib/month_date.rb CHANGED
@@ -16,6 +16,15 @@ module MonthDate
16
16
  end
17
17
 
18
18
  def MonthDate.days_in_month(year, month)
19
- Date.new(year, month, -1).day
19
+ Date.new(year, month, -1).day
20
+ end
21
+
22
+ def MonthDate.date_in_month(year, month)
23
+ days = self.days_in_month(year, month)
24
+ ary = []
25
+ days.upto(days) do |day|
26
+ ary.push("#{year}#{month}#{day}")
27
+ end
28
+ return ary
20
29
  end
21
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: month_date
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.1
4
+ version: 0.0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ctxhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-26 00:00:00.000000000 Z
11
+ date: 2015-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler