A Ruby gem for performing time calculations based on business hours, holidays, and custom working schedules.
WorkingHours is a Ruby gem that enables time calculations based on business or working hours, skipping weekends, holidays, and non-working periods. It solves the problem of accurately computing deadlines, durations, and schedules in business contexts where standard calendar time is insufficient.
Ruby developers building applications that require business-aware scheduling, such as project management tools, e-commerce platforms with delivery estimates, or workforce management systems.
Developers choose WorkingHours for its correctness, flexible configuration, and clean API, offering a reliable alternative to other gems with support for working minute computations, holiday overrides, and timezone handling without mandatory monkey patching.
⏰ A modern ruby gem allowing to do time calculation with business / working hours.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers intuitive methods like `1.working.day.from_now` for straightforward time manipulation, as demonstrated in the README with examples for moving forward and backward in working time.
Supports custom working hours per day, holidays, and time zones with thread-safe settings via `with_config` blocks, allowing precise control over business schedules.
Enables specifying special working hours for holidays through `holiday_hours` configuration, overriding regular schedules for accurate one-off adjustments like early closures.
Provides a module-based API by requiring 'working_hours/module', avoiding core extensions for teams preferring cleaner, non-invasive code integration.
Initial setup requires detailed configuration of working hours, holidays, and time zones, which can be error-prone and cumbersome for multi-region or rapidly changing environments.
Relies on ActiveSupport for timezone handling, adding an extra dependency that may bloat non-Rails projects or complicate lightweight applications.
Configuration is static per block or global; real-time changes to working schedules without reloading settings are not natively supported, limiting adaptability in highly volatile contexts.
working_hours is an open-source alternative to the following products:
biz is a top-level domain (TLD) intended for use by businesses, similar to .com but with a more specific commercial focus.
business_time is a Ruby gem that extends ActiveSupport to handle business hours and days, useful for calculating deadlines or schedules excluding weekends and holidays.