Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/extensions/date.rb
Overview
Add workday and weekday concepts to the Date class
Instance Method Summary collapse
Instance Method Details
#weekday? ⇒ Boolean
7 8 9 |
# File 'lib/extensions/date.rb', line 7 def weekday? [1,2,3,4,5].include? self.wday end |
#workday? ⇒ Boolean
3 4 5 |
# File 'lib/extensions/date.rb', line 3 def workday? self.weekday? && !BusinessTime::Config.holidays.include?(self) end |