Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/incomplete_date/date.rb
Instance Method Summary collapse
- #circa ⇒ Object (also: #circa?)
- #matches?(incomplete_date) ⇒ Boolean
- #to_birthday ⇒ Object
- #to_i ⇒ Object
- #to_incomplete_date ⇒ Object
Instance Method Details
#circa ⇒ Object Also known as: circa?
2 3 4 |
# File 'lib/incomplete_date/date.rb', line 2 def circa false end |
#matches?(incomplete_date) ⇒ Boolean
19 20 21 |
# File 'lib/incomplete_date/date.rb', line 19 def matches?(incomplete_date) incomplete_date.include?(self) end |
#to_birthday ⇒ Object
7 8 9 |
# File 'lib/incomplete_date/date.rb', line 7 def to_birthday IncompleteDate.new(:month => month, :day => day) end |
#to_i ⇒ Object
11 12 13 |
# File 'lib/incomplete_date/date.rb', line 11 def to_i year*10000 + month*100 + day end |
#to_incomplete_date ⇒ Object
15 16 17 |
# File 'lib/incomplete_date/date.rb', line 15 def to_incomplete_date IncompleteDate.new(self) end |