Class: Date

Inherits:
Object
  • Object
show all
Defined in:
lib/incomplete_date/date.rb

Instance Method Summary collapse

Instance Method Details

#circaObject Also known as: circa?



2
3
4
# File 'lib/incomplete_date/date.rb', line 2

def circa
  false
end

#matches?(incomplete_date) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/incomplete_date/date.rb', line 19

def matches?(incomplete_date)
  incomplete_date.include?(self)
end

#to_birthdayObject



7
8
9
# File 'lib/incomplete_date/date.rb', line 7

def to_birthday
  IncompleteDate.new(:month => month, :day => day)
end

#to_iObject



11
12
13
# File 'lib/incomplete_date/date.rb', line 11

def to_i
  year*10000 + month*100 + day
end

#to_incomplete_dateObject



15
16
17
# File 'lib/incomplete_date/date.rb', line 15

def to_incomplete_date
  IncompleteDate.new(self)
end