Project

clavius

0.08
No release in over 3 years
Low commit activity in last 3 years
Date calculations based on a schedule.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Clavius

Gem Version Build Status Code Climate Test Coverage

Date calculations based on a schedule.

Installation

gem install clavius

Configuration

Clavius.configure do |c|
  c.weekdays = %i[mon tue wed thu fri]
  c.included = [Date.new(2023, 7, 1)]
  c.excluded = [Date.new(2023, 7, 4), Date.new(2023, 12, 25)]
end

Usage

Clavius.active?(Date.new(2023, 1, 5))

Clavius.days(5).before(Date.new(2023, 1, 5))

Clavius.days(2).after(Date.new(2023, 1, 5))

Clavius.between(Date.new(2023, 1, 1), Date.new(2023, 1, 8))

Contributing

Pull requests are welcome, but consider asking for a feature or bug fix first through the issue tracker. When contributing code, please squash sloppy commits aggressively and follow Tim Pope's guidelines for commit messages.

Copyright

Copyright (c) 2015-2023 Craig Little. See LICENSE for details.