Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Ruby
  3. business_time

business_time

MITRubyv0.13.0

A Ruby gem for performing time calculations based on business hours, workdays, and holidays.

GitHubGitHub
1.3k stars217 forks0 contributors

What is business_time?

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.

Target Audience

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.

Value Proposition

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.

Overview

Support for doing time math in business hours and days

Use Cases

Best For

  • Calculating SLA deadlines in customer support ticketing systems
  • Scheduling project deliverables excluding weekends and holidays
  • Generating invoices with due dates based on business days
  • Tracking work hours and overtime in time-tracking applications
  • Building scheduling features for appointment-based services
  • Implementing business logic for financial transaction processing timelines

Not Ideal For

  • Projects requiring sub-hour precision like minute-level SLA tracking
  • Applications with highly dynamic, real-time scheduling across rapidly changing timezones
  • Non-Ruby stacks or environments not using ActiveSupport

Pros & Cons

Pros

Intuitive ActiveSupport Integration

Extends familiar ActiveSupport methods with business-aware versions like `8.business_hours.from_now`, making adoption seamless for Ruby developers.

Flexible Schedule Configuration

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.

Robust Holiday Handling

Supports static holidays, dynamic loading from gems like Holidays, and per-calculation holiday passing, ensuring adaptability to various regional rules.

Production-Stable Design

Prioritizes reliability over new features, with a long history and minimal breaking changes, as emphasized in the stability note.

Cons

Edge Case Inconsistencies

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 Complexity

Timezone handling is described as perplexing and potentially buggy, which can lead to confusion in multi-timezone applications despite being designed as agnostic.

No Fine-Grained Precision

Deliberately omits support for business minutes or seconds, limiting use cases that require sub-hour accuracy, as stated in the NOT TODO section.

Frequently Asked Questions

Quick Stats

Stars1,330
Forks217
Contributors0
Open Issues20
Last commit7 months ago
CreatedSince 2010

Tags

#time-calculation#active-support#ruby-gem#enterprise-tools#business-hours

Built With

R
Ruby

Included in

Ruby14.1k
Auto-fetched 13 hours ago

Related Projects

groupdategroupdate

The simplest way to group temporal data

Stars3,885
Forks240
Last commit15 days ago
chronicchronic

Chronic is a pure Ruby natural language date parser.

Stars3,253
Forks450
Last commit3 years ago
ice_cubeice_cube

Ruby Date Recurrence Library - Allows easy creation of recurrence rules and fast querying

Stars2,468
Forks359
Last commit10 months ago
local_timelocal_time

Rails engine for cache-friendly, client-side local time

Stars1,999
Forks124
Last commit4 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub