https://github.com/cloudwalk/business-days
Checks if a given date is a business day and performs computations based on Business days.
https://github.com/cloudwalk/business-days
Last synced: 10 months ago
JSON representation
Checks if a given date is a business day and performs computations based on Business days.
- Host: GitHub
- URL: https://github.com/cloudwalk/business-days
- Owner: cloudwalk
- License: mit
- Created: 2017-08-11T14:03:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T16:02:08.000Z (over 1 year ago)
- Last Synced: 2024-11-25T03:13:16.304Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 39.1 KB
- Stars: 2
- Watchers: 11
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Business Days
Methods to check if a given date is a business days and to perform computations based on Business days.
## Installation
Add to your Gemfile:
```
gem 'business-days'
```
## Example
To add 2 business days to current time:
```
BusinessDays::business_days_from_utc_time(2, Time.now.utc)
```
## Limitations
- Hard coded to work with Brazilian times.
- Can only add business days to a given date, not subtract.
## Development
To generate a new build:
```
gem build business-days.gemspec
```
To publish a new version:
```
gem push business-days-$VERSION.gem
```
## License
This project is released under the [MIT License](https://opensource.org/licenses/MIT).