Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. when

when

Apache-2.0Gov1.1.0

A natural language date/time parser with pluggable rules and merge strategies for Go applications.

GitHubGitHub
1.5k stars94 forks0 contributors

What is when?

When is a Go library for parsing natural language date and time expressions into structured time data. It enables applications to understand human-readable time references like 'tonight at 11:10 pm' or 'next Tuesday at 2:25 p.m.' without requiring rigid input formats.

Target Audience

Go developers building applications that need to process user-entered, informal date and time strings, such as chatbots, scheduling tools, or command-line interfaces.

Value Proposition

Developers choose When for its pluggable, multi-language rule system and configurable cluster matching, which allows precise handling of composite expressions and extensibility to new languages or custom formats.

Overview

A natural language date/time parser with pluggable rules

Use Cases

Best For

  • Parsing informal date-time strings in user-generated text for chatbots or virtual assistants.
  • Extracting scheduling information from natural language input in productivity or calendar applications.
  • Processing log entries or timestamps that include relative time phrases like 'next Wednesday'.
  • Building multilingual applications that require date-time parsing in languages like English, Russian, Brazilian Portuguese, Chinese, or Dutch.
  • Handling composite time expressions where multiple date and time components are spread within a sentence.
  • Creating custom parsing rules for domain-specific or niche time expressions not covered by standard libraries.

Not Ideal For

  • Projects requiring strict ISO 8601 or RFC 3339 date format validation without natural language ambiguity
  • High-throughput systems where low-latency parsing is critical and computational overhead from rule matching is unacceptable
  • Applications needing immediate support for languages beyond English, Russian, Brazilian Portuguese, Chinese, or Dutch without custom rule development
  • Use cases where date-time input must be error-proof and ambiguous phrases should be rejected rather than interpreted

Pros & Cons

Pros

Multi-language Support

Includes built-in rules for five languages (EN, RU, BR, ZH, NL) with pluggable architecture, allowing extensibility for international applications as mentioned in the README.

Flexible Cluster Matching

Groups nearby matches within a configurable distance to handle composite expressions like 'next Wednesday at 2:25 p.m.', demonstrated in the README examples with distance tuning.

Extensible Rule System

Encourages community contributions for adding custom rules or languages, with an open issue system for missing cases, making it adaptable to niche or domain-specific expressions.

Configurable Parsing Options

Allows tuning of match distance and ordering via options like Distance and MatchByOrder, providing control over how text patterns are processed for optimization.

Cons

Incomplete Rule Coverage

The TODO list admits missed rules from examples like those in the chronic library, meaning some natural language expressions may not be parsed correctly out of the box.

Limited Merge Strategies

Only the Override strategy is fully implemented, with other strategies not yet available, which can restrict conflict resolution in complex parses, as noted in the README.

Documentation Gaps

The README explicitly lists describing all existing rules as a TODO item, so current documentation is incomplete and may hinder quick adoption or troubleshooting.

Performance Overhead

Natural language parsing with multiple rules and cluster matching is inherently slower than simple date parsing, making it less suitable for performance-sensitive applications without careful optimization.

Frequently Asked Questions

Quick Stats

Stars1,461
Forks94
Contributors0
Open Issues9
Last commit1 year ago
CreatedSince 2016

Tags

#datetime#natural-language#time-parsing#time#go-library#multilingual#natural-language-processing#text-processing#pluggable-architecture#golang#date#date-parsing#parser

Built With

G
Go

Included in

Go169.1k
Auto-fetched 1 day ago

Related Projects

shsh

A shell parser, formatter, and interpreter with bash and zsh support; includes shfmt

Stars8,800
Forks410
Last commit6 days ago
gofeedgofeed

Parse RSS, Atom and JSON feeds in Go

Stars2,836
Forks220
Last commit1 year ago
go-querystringgo-querystring

go-querystring is Go library for encoding structs into URL query strings.

Stars2,139
Forks183
Last commit6 days ago
godump (goforj)godump (goforj)

A minimal, developer-friendly pretty-printer and debug dumper for Go structs, inspired by Laravel’s dump() and Symfony’s VarDumper.

Stars1,743
Forks36
Last commit3 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