Module: ActiveSupport::CoreExtensions::DateTime::Calculations

Included in:
Time
Defined in:
lib/weekdays.rb

Overview

Enables the use of time calculations within DateTime itself

Instance Method Summary collapse

Instance Method Details

#weekday?Boolean

Tells whether the Date object is a weekday

Returns:

  • (Boolean)


53
54
55
# File 'lib/weekdays.rb', line 53

def weekday?
  (1..5).include?(wday)
end