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 +4 -4
- data/lib/month_date/version.rb +1 -1
- data/lib/month_date.rb +10 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f142704b35a9ecd332585e86cc9f21459562d89
|
4
|
+
data.tar.gz: 69222e5a969dafb1502f51536410346d03d88dad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44b44e5e2c3dc91d826e1b702f1423931b09346b70a32e76c84e5a0eee8a4ab6dbd970eb5cdbb4a95515d96da887da80a8d1a53741b9c7f205c5a54c4b31ba51
|
7
|
+
data.tar.gz: ff73326be167db940f51f089fd30f3864c6d831ef128db54d1fc4f7b865db12bd5b1187ee869633ca1740dd37f1c95dad792d997658a9d326683c79d40de55b9
|
data/lib/month_date/version.rb
CHANGED
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
|
-
|
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.
|
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-
|
11
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|