Sha256: fbed420ed6e536a0065f51f75836335b7ad5e1ac99072c92c7eb32eb236baa6a
Contents?: true
Size: 1.52 KB
Versions: 1
Compression:
Stored size: 1.52 KB
Contents
# WorkingCalendar [](https://rubygems.org/gems/working_calendar) [](https://github.com/gabynaiman/working_calendar/actions/workflows/ci.yml) [](https://coveralls.io/github/gabynaiman/working_calendar?branch=master) [](https://codeclimate.com/github/gabynaiman/working_calendar) Working calendar specification ## Installation Add this line to your application's Gemfile: ```ruby gem 'working_calendar' ``` And then execute: $ bundle Or install it yourself as: $ gem install working_calendar ## Usage ```ruby calendar = WorkingCalendar.new '-0600' # Working calendar.add_working_week_day :monday, '09:00' => '18:00' calendar.add_working_date '2018-12-29', '10:00' => '14:00' # Not working calendar.add_not_working_week_day :monday, '13:00' => '14:00' calendar.add_not_working_date '2018-12-31', '10:00' => '14:00' calendar.working_at? Time.parse('2018-12-17T12:35:00-0600') # => true calendar.working_at? Time.parse('2018-12-31T13:35:00-0600') # => false ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/gabynaiman/working_calendar. ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
working_calendar-0.1.1 | README.md |