mojombo/chronic — explained in plain English
Analysis updated 2026-07-23 · repo last pushed 2023-09-28
Let users type natural reminders like 'next Tuesday at 3pm' in a task manager app.
Build a scheduling tool that accepts phrases like 'last Friday at 20:00' instead of strict date formats.
Add flexible date parsing to any Ruby app so users can say 'tomorrow' or '3 years ago'.
| mojombo/chronic | scenic-views/scenic | fatfreecrm/fat_free_crm | |
|---|---|---|---|
| Stars | 3,256 | 3,621 | 3,626 |
| Language | Ruby | Ruby | Ruby |
| Last pushed | 2023-09-28 | — | — |
| Maintenance | Dormant | — | — |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 2/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Install the gem and call Chronic.parse with a string, no external dependencies required.
Chronic is a Ruby library that takes human-friendly date and time phrases like "next Friday at 5pm" or "3 years ago" and converts them into structured dates a computer can use. It bridges the gap between how people naturally talk about time and how software needs to store it. When you pass a string to Chronic, it attempts to figure out the date and time you meant. It handles a huge range of formats, from simple expressions like "tomorrow" or "yesterday" to complex ones like "3rd Wednesday in November" or "fourteenth of June 2010 at eleven o'clock in the evening." It is case insensitive, tolerates common misspellings, and handles abbreviations. If it cannot make sense of a phrase, it simply returns nil rather than raising an error. You can also provide context hints, like whether an ambiguous phrase like "monday" should refer to the past or future, and specify how dates should be interpreted. This is useful for anyone building a Ruby app that needs to accept user input about dates in a flexible way. Imagine a task manager where users type "remind me next Tuesday at 3pm" or a scheduling tool where someone enters "last Friday at 20:00." Instead of forcing users to pick dates from a calendar widget or type in a strict format like MM/DD/YYYY, you can let them write naturally and let Chronic sort out what they meant. One notable aspect is its handling of time zones. By default it uses your system's local time zone, but you can plug in a more capable time zone class (like the one from Rails' ActiveSupport) to get full time zone awareness. The README does note a limitation: it relies on Ruby's built-in Time class, so dates outside of that class's supported range will fail to parse and return nil.
Chronic is a Ruby library that turns plain-English date and time phrases like 'next Friday at 5pm' into structured dates your app can use, so users never have to fill out a rigid calendar form.
Mainly Ruby. The stack also includes Ruby.
Dormant — no commits in 2+ years (last push 2023-09-28).
No license information is mentioned in the explanation, so the licensing terms are unknown.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.