month_date 0.5.0 → 0.5.1

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: 8b66c962610a78457f3f9f750c8a1de3bd768fdd
4
- data.tar.gz: 0e73047dd74fdc392700b34f14672a805a9323f3
3
+ metadata.gz: 63f11ac4cfb9309e8b5f1671b71174c87d1e5df3
4
+ data.tar.gz: 249256327f54fcf3a8d7d2912361e7956c53c4df
5
5
  SHA512:
6
- metadata.gz: b449d975963651e21831fc1f10b45ec6c02d65c42aa7603ee0a89cae861f5f7f206a21f73b3b13fb7995ae085d859b5edf0557d953ee9ab5786d6c5c368e1dfa
7
- data.tar.gz: bda76c5e338e66b5777316cf8fdb099102f26a0aecf0103f50964069d7d77575d3dbc44e21493a257dc55aee296291d3cdb32a5c331ecd25153bfbdf80215028
6
+ metadata.gz: 8c0c67b2a985138bbd1c7566c727c21758d2a414539f311c487fc6e74d9bf6a6ca136d961b343d0054629deacd9accba5cb4a139b263b3084d918204bf6742d2
7
+ data.tar.gz: cf81659d9a8c345ffad0aa16b5f6d26962eb4e44d86c1c704a4ac0b618153cc89f3dbc91802871801bc5cb39e304a80cf8cdd17ba30d90b5ac1a1a3fe97c02e8
data/README.md CHANGED
@@ -100,5 +100,7 @@ Or install it yourself as:
100
100
  ## Todo
101
101
 
102
102
  * Need to refactor!
103
+
104
+
103
105
  ## License
104
106
  MIT [@ctxhou](http://github.com/ctxhou)
data/lib/month_date.rb CHANGED
@@ -44,7 +44,7 @@ module MonthDate
44
44
  end
45
45
  end
46
46
  (start_date.mon+1..end_date.mon-1).to_a.each do |month|
47
- tmp = self.date_in_month(start_date.year, month, true)
47
+ tmp = self.date_in_month(start_date.year, month, format, true)
48
48
  weekend += tmp[:weekend]
49
49
  weekday += tmp[:weekday]
50
50
  end
@@ -107,7 +107,9 @@ module MonthDate
107
107
  return result
108
108
  else
109
109
  1.upto(days) do |day|
110
+
110
111
  date = Date.new(year, month, day)
112
+
111
113
  ary << date.strftime(format)
112
114
  end
113
115
  return ary
@@ -1,3 +1,3 @@
1
1
  module MonthDate
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -7,7 +7,8 @@ describe MonthDate do
7
7
  end
8
8
 
9
9
  it "test dates_in_range" do
10
- result = MonthDate.dates_in_range(20140101, 20150205, "%Y%m%d", true)
10
+ result1 = MonthDate.dates_in_range(20140101, 20150205, "%Y%m%d", true)
11
+ result2 = MonthDate.dates_in_range(20140101, 20140305)
11
12
  end
12
13
 
13
14
  it "test date_in_month" do
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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ctxhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-31 00:00:00.000000000 Z
11
+ date: 2015-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler