A Ruby gem for performing time calculations based on configurable business hours, holidays, and breaks.
Biz is a Ruby library for performing time calculations based on configurable business hours. It solves the problem of accurately computing deadlines, durations, and availability while accounting for holidays, breaks, shifts, and time zones. Developers use it to model real-world operational schedules in applications like customer support systems, project management tools, and service level agreement trackers.
Ruby developers building applications that require business-aware time calculations, such as customer service platforms, ticketing systems, or any software that needs to respect working hours and closures.
Biz offers a robust, dependency-free solution with second-level precision and comprehensive feature support (holidays, breaks, shifts, DST handling), making it more reliable and configurable than simpler alternatives for complex scheduling needs.
Time calculations using business hours.
Provides exact calculations down to the second for business time, including support for breaks and shifts, as demonstrated in usage examples like 'Biz.time(30, :minutes).before'.
Allows configuration of multiple intervals per day, full-day coverage, time zones, holidays, breaks, and shifts, enabling accurate representation of complex real-world schedules.
Avoids dependencies like ActiveSupport, reducing bloat and compatibility issues, as stated in the anti-features section of the README.
Designed to be safe in multi-threaded environments, with recommendations for global variable use in threaded apps, making it suitable for scalable applications.
Setting up hours, shifts, breaks, and holidays requires detailed, manual configuration in Ruby hashes, which can be tedious and error-prone for large or dynamic schedules.
The README admits that day calculations are inherently ambiguous and may not satisfy all use cases out of the box, potentially requiring custom logic for specific needs.
For schedules with many holidays, the README recommends pre-filtering to improve performance, indicating scalability concerns with large datasets.
The simplest way to group temporal data
Chronic is a pure Ruby natural language date parser.
Ruby Date Recurrence Library - Allows easy creation of recurrence rules and fast querying
Rails engine for cache-friendly, client-side local time
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.