periods 0.0.7 → 0.0.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 157af8429236011f6b5d28c43df6a6c6fd96156e
4
- data.tar.gz: 80a7b74aa78c8e08b39a41e7e1c505a748162d40
3
+ metadata.gz: 1a368b82d45f08540c0ab40732abb61d69b0a6cd
4
+ data.tar.gz: 1a626aed26b792da37379d8458daaf9e780ac277
5
5
  SHA512:
6
- metadata.gz: 8d702a50cef9515c488948d02537cf912e7694704a832b72b62e62836b86f7092bf560f4f97011444ae7582e3f127a9a82f92b3b4fe45f3b32f234a0f259fe20
7
- data.tar.gz: 1fa325d6fb372e852759ff8cc341a0d7aaeb6ec1fcb67f9f998adc22aada49e42b4fa7cb93eb2cee355abaf7e9c82240bf381e6b077cee91e58344695f2460ca
6
+ metadata.gz: 8e37c81f7bc38bc25bcb287118c8fe7566b791a309c7687309fb3ecb1654f8dab62ca9bb042fb097613dc4558fc96b62c2eecb743aa5ce51a7c6c322290385ec
7
+ data.tar.gz: f3f5685b1666a8b6025dd8f376aa88292212b9af9dbda29329f0310be176faa1a357a0f9b1c642e3590c01d5537b58fd4ec69eb2c788b7c9835b3132af48bbd0
data/README.md CHANGED
@@ -58,6 +58,16 @@ All period models respond to the following interface:
58
58
  * Comparable (==, >=, >, <=, <)
59
59
  * to_s
60
60
 
61
+ The following parts support Ruby Range too:
62
+
63
+ `MonthlyPeriod`, `QuarterlyPeriod`, `HalfyearlyPeriod`, `YearlyPeriod`,
64
+ `Month`, `Quarter`, `Halfyear` and `Year`.
65
+
66
+ Example:
67
+
68
+ range = Month.for('01.01.2015')..Month.for('01.12.2015')
69
+ range.to_a # => 12 Months from Jan 2015 til Dec 2015
70
+
61
71
  Special period models may define additional methods like `months` (see below).
62
72
 
63
73
  #### start_year
@@ -9,7 +9,6 @@ module Periods
9
9
  base.class_eval do
10
10
  include Periods::Modules::MonthlyPeriod
11
11
  include InstanceMethods
12
- alias_method :succ, :next
13
12
  end
14
13
  end
15
14
 
@@ -10,6 +10,7 @@ module Periods
10
10
  include Periods::Modules::Period
11
11
  include SingleDateInitialize
12
12
  include InstanceMethods
13
+ alias_method :succ, :next
13
14
  end
14
15
  end
15
16
 
@@ -1,3 +1,3 @@
1
1
  module Periods
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: periods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Baustert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-07 00:00:00.000000000 Z
11
+ date: 2016-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler