date_range_covers 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -18,7 +18,24 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ require 'date_range_covers'
22
+
23
+ start_date = Date.parse('2013-01-01')
24
+ end_date = Date.parse('2013-04-11')
25
+ start_of_week = :sunday
26
+
27
+ d = DateRangeCovers::DateRange.new(start_date, end_date, start_of_week)
28
+
29
+ d.covers
30
+ => {
31
+ :dates=>[
32
+ Mon, 01 Apr 2013, Tue, 02 Apr 2013, Wed, 03 Apr 2013, Thu, 04 Apr 2013,
33
+ Fri, 05 Apr 2013, Sat, 06 Apr 2013, Sun, 07 Apr 2013, Mon, 08 Apr 2013,
34
+ Tue, 09 Apr 2013, Wed, 10 Apr 2013, Thu, 11 Apr 2013
35
+ ],
36
+ :months=>[Tue, 01 Jan 2013, Fri, 01 Feb 2013, Fri, 01 Mar 2013],
37
+ :weeks=>[]
38
+ }
22
39
 
23
40
  ## Contributing
24
41
 
@@ -1,3 +1,3 @@
1
1
  module DateRangeCovers
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -233,6 +233,8 @@ module DateRangeCovers
233
233
  end
234
234
 
235
235
  def covers(cover_options = [:all])
236
+ @covs = {}
237
+
236
238
  if cover_options.include?(:all)
237
239
  months_covered
238
240
  weeks_covered
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: date_range_covers
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Antall Fernandes
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-03-19 00:00:00 Z
18
+ date: 2013-03-20 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bundler