Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. NLP with Ruby
  3. chronic

chronic

MITRuby

A pure Ruby natural language date/time parser that converts human-readable phrases into structured time objects.

Visit WebsiteGitHubGitHub
3.3k stars450 forks0 contributors

What is chronic?

Chronic is a natural language date and time parser written in pure Ruby. It converts human-readable phrases like 'tomorrow at 5pm' or '3 years ago' into structured Ruby Time objects or time spans, solving the problem of interpreting flexible date inputs in applications.

Target Audience

Ruby developers building applications that need to parse user-provided date strings, particularly those working on scheduling tools, calendar applications, or any system requiring flexible date input handling.

Value Proposition

Developers choose Chronic for its extensive natural language support, pure Ruby implementation with no dependencies, and configurable parsing options that handle edge cases like time zones and ambiguous date ranges.

Overview

Chronic is a pure Ruby natural language date parser.

Use Cases

Best For

  • Parsing user-entered date strings in Ruby web applications
  • Building scheduling or calendar tools with natural language input
  • Processing log files with human-readable timestamps
  • Creating command-line tools that accept flexible date arguments
  • Implementing reminder systems with phrases like 'in 3 hours'
  • Handling international date formats and time zone conversions

Not Ideal For

  • High-throughput applications parsing standardized date formats like ISO 8601, where dedicated parsers offer better performance
  • Projects requiring handling of dates outside Ruby's Time class range (e.g., before 1901 or after 2038 on many systems)
  • Non-Ruby environments or polyglot projects needing a language-agnostic date parsing solution
  • Systems where precise, unambiguous date interpretation is critical and natural language inference could lead to errors

Pros & Cons

Pros

Extensive Natural Language Support

Parses a wide variety of human-readable phrases from simple terms like 'tomorrow' to complex expressions like '7 hours before tomorrow at noon', as shown in the extensive examples list.

Dependency-Free Integration

Implemented in pure Ruby with no external gems, making it easy to add to any Ruby project without additional setup or compatibility issues.

Configurable Parsing Options

Offers settings like :context for past/future hints and :ambiguous_time_range for control over time interpretation, allowing developers to fine-tune accuracy for edge cases.

Time Zone Flexibility

Supports custom time classes, enabling integration with systems like ActiveSupport::TimeZone for proper time zone handling, as demonstrated in the README.

Cons

Limited Date Range

Relies on Ruby's built-in Time class, so dates outside its supported range will return nil, a limitation explicitly admitted in the README that restricts use for historical or far-future dates.

Ambiguity in Parsing

Natural language inputs can be misinterpreted; for example, 'this tuesday 5:00' defaults to PM without configuration, requiring careful option setting to avoid errors in time-sensitive applications.

English-Centric Design

Primarily optimized for English date expressions, making it less suitable for international applications without custom preprocessing or modifications for other languages.

Frequently Asked Questions

Quick Stats

Stars3,256
Forks450
Contributors0
Open Issues136
Last commit2 years ago
CreatedSince 2008

Tags

#developer-tools#datetime#ruby-gem#natural-language-processing#date-parsing#ruby#time-manipulation#parser#timezone-handling

Built With

R
Ruby

Links & Resources

Website

Included in

Ruby14.1kNLP with Ruby1.1k
Auto-fetched 11 hours ago

Related Projects

groupdategroupdate

The simplest way to group temporal data

Stars3,889
Forks242
Last commit25 days ago
ice_cubeice_cube

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

Stars2,470
Forks354
Last commit6 months ago
local_timelocal_time

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

Stars2,001
Forks126
Last commit11 days ago
validates_timelinessvalidates_timeliness

Date and time validation plugin for ActiveModel and Rails. Supports multiple ORMs and allows custom date/time formats.

Stars1,621
Forks234
Last commit7 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