partial-date 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog.markdown CHANGED
@@ -1,3 +1,6 @@
1
+ ### 1.2.1 / 2012-10-05
2
+ * Bugfix: Merged pull request and bugfix for zero day mask. Thank you Alexander Gräfe. https://github.com/rickenharp
3
+
1
4
  ### 1.2.0 / 2012-06-03
2
5
 
3
6
  * Documentation and comment clean-up
data/README.markdown CHANGED
@@ -4,8 +4,6 @@
4
4
 
5
5
  * [Homepage](https://github.com/58bits/partial-date#readme)
6
6
  * [Issues](https://github.com/58bits/partial-date/issues)
7
- * [Documentation](http://rubydoc.info/gems/partial-date/frames)
8
-
9
7
 
10
8
  ## Description
11
9
 
@@ -16,7 +16,7 @@ module PartialDate
16
16
  ZERO_SIGN_MASK = 0b011111111111111111111111111111
17
17
  ZERO_YEAR_MASK = 0b100000000000000000000111111111
18
18
  ZERO_MONTH_MASK = 0b111111111111111111111000011111
19
- ZERO_DAY_MASK = 0b111111111111111111111111000000
19
+ ZERO_DAY_MASK = 0b111111111111111111111111100000
20
20
 
21
21
  SIGN_SHIFT = 29
22
22
  YEAR_SHIFT = 9
@@ -1,4 +1,4 @@
1
1
  module PartialDate
2
2
  # partial-date version
3
- VERSION = "1.2.0"
3
+ VERSION = "1.2.1"
4
4
  end
data/spec/date_spec.rb CHANGED
@@ -19,13 +19,13 @@ describe PartialDate::Date do
19
19
  end
20
20
 
21
21
  it "should allow construction from a block of integers" do
22
- new_date = PartialDate::Date.new {|d| d.year = 2010; d.month = 12; d.day = 1}
23
- new_date.value.should == 20101201
22
+ new_date = PartialDate::Date.new {|d| d.year = 2010; d.month = 11; d.day = 1}
23
+ new_date.value.should == 20101101
24
24
  end
25
25
 
26
26
  it "should allow construction from a block of strings" do
27
- new_date = PartialDate::Date.new {|d| d.year = "2010"; d.month = "12"; d.day = "1"}
28
- new_date.value.should == 20101201
27
+ new_date = PartialDate::Date.new {|d| d.year = "2010"; d.month = "11"; d.day = "1"}
28
+ new_date.value.should == 20101101
29
29
  end
30
30
 
31
31
  it "should allow construction from the class load method" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: partial-date
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-03 00:00:00.000000000 Z
12
+ date: 2012-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubygems-tasks