Class: Date

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

Instance Method Summary collapse

Instance Method Details

#shopping_black_friday?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/a_special_day.rb', line 5

def shopping_black_friday?
  self.prev_day.united_states_thanksgiving?
end

#united_states_thanksgiving?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/a_special_day.rb', line 9

def united_states_thanksgiving?
  self.month == 11 and self.thursday? and self.day >= 22
end