0.0
No commit activity in last 3 years
No release in over a year
Simple date operations to determine weekends, holidays, and esp. business days. Based on the Holidays Gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

DateOperations

Get more details at codescene.io.

Overview

Different date operations, primarily around business days; based on the Holidays Gem.

Synopsis

DateOperations.[...]

Installation

Download the gem, then install it:

gem install dateoperations.gemspec

Examples

require 'dateoperations'
...
DateOperations.country #=> :de

DateOperations.holiday?(Date.new(2016, 10, 3)) #=> true

DateOperations.country = :us #=> :us
DateOperations.holiday?(Date.new(2016, 10, 3)) # => false

DateOperations.country = :de #=> :de
DateOperations.number_of_business_days_between(Date.new(2016, 10, 1), Date.new(2016, 10, -1)) #=> 20

DateOperations.country = :au #=> :au
DateOperations.number_of_business_days_between(Date.new(2016, 10, 1), Date.new(2016, 10, -1)) #=> 21

DateOperations.weekend?(DateOperations.weekend?(Date.new(2016, 6, 18)) #=> true

Documentation

Documentation