Today I'm releasing whenwords, a relative time formatting library that contains no code.
whenwords delivers the following functions:
There are many libraries that perform similar functions. But none of them are language agnostic.
whenwords supports Ruby, Python, Rust, Elixir, Swift, PHP, and Bash. I'm sure it works in other languages, too. Those are just the languages I've tried and tested.
(I even implemented it as Excel formulas. Though that one requires a bit of work to install.)
But like I said: the whenwords library contains no code. Instead, whenwords contains specs and tests, specifically:
whenwords, for you, the human.The installation instructions are comically simple, just a prompt to paste into Claude, Codex, Cursor, whatever. It's short enough to print here in its entirety:
Implement the whenwords library in [LANGUAGE].
1. Read SPEC.md for complete behavior specification
2. Parse tests.yaml and generate a test file
3. Implement all five functions: timeago, duration, parse_duration,
human_date, date_range
4. Run tests until all pass
5. Place implementation in [LOCATION]
All tests.yaml test cases must pass. See SPEC.md "Testing" section
for test generation examples.
Pick your language, pick your location, copy, paste, and go.
9,489 followers · starred Jan 2026
3,989 followers · starred Jan 2026
304 followers · starred Jan 2026
643 followers · starred Jan 2026
Today I'm releasing whenwords, a relative time formatting library that contains no code.
whenwords delivers the following functions:
There are many libraries that perform similar functions. But none of them are language agnostic.
whenwords supports Ruby, Python, Rust, Elixir, Swift, PHP, and Bash. I'm sure it works in other languages, too. Those are just the languages I've tried and tested.
(I even implemented it as Excel formulas. Though that one requires a bit of work to install.)
But like I said: the whenwords library contains no code. Instead, whenwords contains specs and tests, specifically:
whenwords, for you, the human.The installation instructions are comically simple, just a prompt to paste into Claude, Codex, Cursor, whatever. It's short enough to print here in its entirety:
Implement the whenwords library in [LANGUAGE].
1. Read SPEC.md for complete behavior specification
2. Parse tests.yaml and generate a test file
3. Implement all five functions: timeago, duration, parse_duration,
human_date, date_range
4. Run tests until all pass
5. Place implementation in [LOCATION]
All tests.yaml test cases must pass. See SPEC.md "Testing" section
for test generation examples.
Pick your language, pick your location, copy, paste, and go.
9,489 followers · starred Jan 2026
3,989 followers · starred Jan 2026
304 followers · starred Jan 2026
643 followers · starred Jan 2026