Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/coderberry/date_extensions

Simple date extensions to get next business day
https://github.com/coderberry/date_extensions

Last synced: 22 days ago
JSON representation

Simple date extensions to get next business day

Awesome Lists containing this project

README

        

Date Extensions
===============

Simple plugin to extend the Date class in order to get the next business day from a date.

Example
=======

Use an existing business day:

>> d = Date.civil(2009,11,2)
=> Mon, 02 Nov 2009
>> d.to_next_business_day
=> Mon, 02 Nov 2009

Use a holiday:

>> d = Date.civil(2009,12,25)
=> Fri, 25 Dec 2009
>> d.to_next_business_day
=> Mon, 28 Dec 2009

Use a weekend:

>> d = Date.civil(2009,11,7)
=> Sat, 07 Nov 2009
>> d.to_next_business_day
=> Mon, 09 Nov 2009

Copyright (c) 2009 Eric Berry, released under the MIT license