- Git: https://github.com/SixArm/sixarm_ruby_date_days
- Doc: http://sixarm.com/sixarm_ruby_date_days/doc
- Gem: https://rubygems.org/gems/sixarm_ruby_date_days
- Contact: Joel Parker Henderson, joel@sixarm.com
- Project: changes, license, contributing.
Extend the Ruby Date class with methods for workweek days and weekend days:
date.workweek?
#=> true when the date is Monday through Friday.
date.weekend?
#=> true when the date is Saturday or Sunday.
We also provide constants:
Date::WEEKEND_WDAYS #=> [0, 6]
Date::WEEKEND_DAYNAMES #=> ["Sunday", "Saturday"]
Date::WEEKEND_ABBR_DAYNAMES #=> ["Sun", "Sat"]
Date::WORKWEEK_WDAYS #=> [1, 2, 3, 4, 5]
Date::WORKWEEK_DAYNAMES #=> ["Monday", "Tuesday", ...]
Date::WORKWEEK_ABBR_DAYNAMES #=> ["Mon", "Tue", ...]
Date::WDAYS #=> [0, 1, 2, 3, 4, 5, 6]
For docs go to http://sixarm.com/sixarm_ruby_date_days/doc
Want to help? We're happy to get pull requests.
To install this gem in your shell or terminal:
gem install sixarm_ruby_date_days
To add this gem to your Gemfile:
gem 'sixarm_ruby_date_days'
To require the gem in your code:
require 'sixarm_ruby_date_days'