partial-date 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +4 -3
- data/lib/partial-date/version.rb +1 -1
- data/spec/date_spec.rb +0 -1
- metadata +1 -1
data/README.textile
CHANGED
@@ -6,12 +6,13 @@ h1. partial-date
|
|
6
6
|
|
7
7
|
h2. Description
|
8
8
|
|
9
|
-
A simple date class that can be used to store partial date values in a single column/attribute. An example use case would include an archive, or catalogue entry where the complete date is unknown.
|
9
|
+
A simple date class that can be used to store partial date values in a single column/attribute. An example use case would include an archive, or catalogue entry where the complete date is unknown. Year is mandatory, but month and day are optional.
|
10
10
|
|
11
11
|
h2. Features
|
12
12
|
|
13
|
-
PartialDate::Date uses
|
14
|
-
|
13
|
+
PartialDate::Date uses a 23bit register as the backing store for date instances, and bit fiddling to get or set year, month and day values. As such it will perform well in a loop or collection of date objects.
|
14
|
+
|
15
|
+
Use @date.value@ to get or set an Integer value that can be used to rehydrate a date object, or save the date value to a persistance store in a readable Integer form e.g. 20121201 for 2012 December 01.
|
15
16
|
|
16
17
|
h2. Examples
|
17
18
|
|
data/lib/partial-date/version.rb
CHANGED
data/spec/date_spec.rb
CHANGED