A Ruby gem for performing time calculations based on business hours, workdays, and holidays.
Business Time is a Ruby gem that extends ActiveSupport to perform time calculations based on business hours, workdays, and holidays. It solves the problem of accurately scheduling deadlines, calculating durations, and managing timelines in professional settings where weekends and holidays are excluded.
Ruby developers building applications that require business logic around time scheduling, such as project management tools, ticketing systems, invoicing software, or any system needing workday-aware date math.
Developers choose Business Time for its simple, intuitive API that integrates seamlessly with ActiveSupport, reliable handling of complex business rules (custom hours, holidays), and proven stability in production environments over many years.
Support for doing time math in business hours and days
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Extends familiar ActiveSupport methods with business-aware versions like `8.business_hours.from_now`, making adoption seamless for Ruby developers.
Allows custom business hours per day, adjustable work weeks, and holiday management via configuration or options, as shown in examples for work_hours and holiday integration.
Supports static holidays, dynamic loading from gems like Holidays, and per-calculation holiday passing, ensuring adaptability to various regional rules.
Prioritizes reliability over new features, with a long history and minimal breaking changes, as emphasized in the stability note.
The README admits logical issues with workday boundaries, such as the beginning and end of workday not being consistently included or excluded in calculations.
Timezone handling is described as perplexing and potentially buggy, which can lead to confusion in multi-timezone applications despite being designed as agnostic.
Deliberately omits support for business minutes or seconds, limiting use cases that require sub-hour accuracy, as stated in the NOT TODO section.