Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Ruby
  3. holidays

holidays

NOASSERTIONRubyv9.0.0

A Ruby gem for handling statutory and custom holidays with date range queries, region support, and core extensions.

GitHubGitHub
877 stars287 forks0 contributors

What is holidays?

Holidays is a Ruby gem that provides functionality to deal with statutory and custom holidays. It extends Ruby's built-in Date and Time classes, allowing developers to check for holidays on specific dates, within ranges, and across multiple regions. The gem solves the problem of managing holiday logic in applications that require date-aware scheduling, calendar features, or region-specific business rules.

Target Audience

Ruby developers building applications that need to handle holidays, such as scheduling tools, payroll systems, calendar apps, or international services requiring region-specific date logic. It's particularly useful for teams working with multiple countries or custom holiday sets.

Value Proposition

Developers choose this gem for its comprehensive region support, flexibility with custom holiday definitions, and seamless integration with Ruby's core date classes. It stands out by offering both formal and informal holiday handling, observed date logic, and performance optimizations like caching, all maintained as a reliable open-source project.

Overview

A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!

Use Cases

Best For

  • Adding holiday-aware logic to scheduling or calendar applications
  • Building payroll systems that need to account for statutory holidays
  • Creating international services with region-specific date handling
  • Developing custom holiday calendars for companies or organizations
  • Integrating holiday checks into existing Ruby date/time workflows
  • Optimizing performance in applications that frequently query holiday data

Not Ideal For

  • Applications needing real-time holiday data from external APIs or dynamic sources
  • Projects built in languages other than Ruby, such as Python or JavaScript
  • Systems requiring distributed or persistent caching beyond in-memory storage
  • Teams looking for out-of-the-box calendar UI components or visualizations

Pros & Cons

Pros

Comprehensive Region Support

Supports holidays for multiple countries and sub-regions, allowing queries like Holidays.on(Date.new(2008, 1, 1), :us, :fr) to check across regions simultaneously, as shown in the README examples.

Flexible Holiday Handling

Includes options for informal and observed holidays with flags like :informal and :observed, enabling precise control over holiday inclusion, such as fetching Valentine's Day or shifted Canada Day.

Custom Definition Loading

Allows loading custom holiday definition files on the fly via Holidays.load_custom, letting teams define company-specific or regional holidays without modifying core gem files.

Seamless Ruby Integration

Extends Ruby's Date and Time classes with holiday methods, making checks intuitive with examples like d.holidays(:is) or d.holiday?(:ca) for Iceland or Canada.

Performance Caching

Offers in-memory caching with Holidays.cache_between to pre-calculate holidays for date ranges, improving lookup speed in high-frequency applications as detailed in the caching section.

Cons

Time Zone Ignorance

The library explicitly states it ignores time zones and assumes all dates are in the same zone, which can lead to inaccuracies in global or distributed applications.

Static Definition Reliance

Holiday definitions are based on static files, and the README notes that definition changes are considered 'minor' bumps, meaning holiday results can change without code modifications, potentially breaking assumptions.

In-Memory Caching Limitation

Caching is only in-memory, making it unsuitable for distributed systems or applications that restart frequently, as highlighted in the caching section without options for persistent storage.

Invasive Setup for Extensions

To use core extensions, developers must modify Ruby's Date and Time classes by including modules, which could conflict with other libraries or be undesirable in certain codebases.

Frequently Asked Questions

Quick Stats

Stars877
Forks287
Contributors0
Open Issues24
Last commit9 days ago
CreatedSince 2008

Tags

#holiday-calculation#ruby-gem#date-handling#calendar-integration#scheduling

Built With

R
Ruby

Included in

Ruby14.1k
Auto-fetched 16 hours ago

Related Projects

groupdategroupdate

The simplest way to group temporal data

Stars3,889
Forks238
Last commit1 month ago
chronicchronic

Chronic is a pure Ruby natural language date parser.

Stars3,258
Forks451
Last commit2 years ago
ice_cubeice_cube

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

Stars2,471
Forks356
Last commit5 months ago
local_timelocal_time

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

Stars2,000
Forks124
Last commit2 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