Skip to content

craiglittle/clavius

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

100 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Date calculations based on a schedule.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages