Class: Date

Inherits:
Object
  • Object
show all
Defined in:
lib/qcourses/date_ex.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.a_month_from_nowObject



11
12
13
# File 'lib/qcourses/date_ex.rb', line 11

def self.a_month_from_now
  today.next_month
end

.tomorrowObject



3
4
5
# File 'lib/qcourses/date_ex.rb', line 3

def self.tomorrow 
  today.next
end

Instance Method Details

#as_date_stringObject



15
16
17
# File 'lib/qcourses/date_ex.rb', line 15

def as_date_string
  to_date.to_s
end

#tomorrowObject



7
8
9
# File 'lib/qcourses/date_ex.rb', line 7

def tomorrow
  self.next
end