partial-date 1.1.0 → 1.1.1
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.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