{"id":44043980,"url":"https://github.com/dbreunig/whenwords","last_synced_at":"2026-02-07T21:34:36.097Z","repository":{"id":333331831,"uuid":"1130699911","full_name":"dbreunig/whenwords","owner":"dbreunig","description":"A relative time formatting library, with no code.","archived":false,"fork":false,"pushed_at":"2026-01-20T17:09:49.000Z","size":22,"stargazers_count":985,"open_issues_count":2,"forks_count":61,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-30T17:22:38.776Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbreunig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-08T22:06:38.000Z","updated_at":"2026-01-30T15:29:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dbreunig/whenwords","commit_stats":null,"previous_names":["dbreunig/whenwords"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dbreunig/whenwords","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbreunig%2Fwhenwords","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbreunig%2Fwhenwords/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbreunig%2Fwhenwords/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbreunig%2Fwhenwords/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbreunig","download_url":"https://codeload.github.com/dbreunig/whenwords/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbreunig%2Fwhenwords/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29208734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T20:33:12.493Z","status":"ssl_error","status_checked_at":"2026-02-07T20:30:47.381Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-07T21:34:35.609Z","updated_at":"2026-02-07T21:34:36.091Z","avatar_url":"https://github.com/dbreunig.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# whenwords: An Open Source Library Without Code\n\nToday I'm releasing [`whenwords`](https://github.com/dbreunig/whenwords), a relative time formatting library that contains _no code_.\n\n`whenwords` delivers the following functions:\n\n- **timeago** — Converts a timestamp to a relative time string like \"3 hours ago\" or \"in 2 days\" based on a reference time.\n- **duration** — Formats a number of seconds as a human-readable duration like \"2 hours, 30 minutes\" or \"2h 30m\" in compact mode.\n- **parse_duration** — The inverse of duration—parses strings like \"2h 30m\" or \"2 hours and 30 minutes\" into seconds.\n- **human_date** — Returns contextual date strings like \"Today\", \"Yesterday\", \"Last Tuesday\", or \"March 5\" depending on how far the date is from a reference point.\n- **date_range** — Formats a start and end timestamp as a smart date range, collapsing redundant information: \"March 5–7, 2024\" instead of \"March 5, 2024 – March 7, 2024\".\n\nThere are _many_ libraries that perform similar functions. But none of them are language agnostic.\n\n`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](https://github.com/dbreunig/whenwords-examples).\n\n(I even implemented it as Excel formulas. Though that one requires a bit of work to install.)\n\nBut like I said: the `whenwords` library _contains no code_. Instead, `whenwords` contains specs and tests, specifically:\n\n- **SPEC.md**: A detailed description of how the library should behave and how it should be implemented.\n- **tests.yaml**: A list of language-agnostic test cases, defined as input/output pairs, that any implementation must pass.\n- **INSTALL.md**: Instructions for building `whenwords`, for you, the human.\n\nThe 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:\n\n``` markdown\nImplement the whenwords library in [LANGUAGE].\n\n1. Read SPEC.md for complete behavior specification\n2. Parse tests.yaml and generate a test file\n3. Implement all five functions: timeago, duration, parse_duration, \n   human_date, date_range\n4. Run tests until all pass\n5. Place implementation in [LOCATION]\n\nAll tests.yaml test cases must pass. See SPEC.md \"Testing\" section \nfor test generation examples.\n```\n\nPick your language, pick your location, copy, paste, and go.\n\n[I've written about `whenwords` here](https://www.dbreunig.com/2026/01/08/a-software-library-with-no-code.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbreunig%2Fwhenwords","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbreunig%2Fwhenwords","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbreunig%2Fwhenwords/lists"}