Skip to content

Replace Humanizer with a small relative-time formatter - #163

Merged
danielchalmers merged 3 commits into
masterfrom
claude/humanizer-replacement-feasibility-281906
Sep 21, 2026
Merged

danielchalmers merged 3 commits into
masterfrom
claude/humanizer-replacement-feasibility-281906

Conversation

@danielchalmers

@danielchalmers danielchalmers commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Humanizer was only used for two things, both English-only: the automatic countdown phrase and the countdown target preview. This replaces it with RelativeTimeFormatter, a ~70 line port of Humanizer 3.0.10's default DateTime algorithm and English strings.

Commit 1: exact port

  • Behavior-neutral. Before removing the package, a temporary sweep compared the port with the real library over ~450k offsets in both tenses across five anchor dates (month ends, leap day). Zero mismatches.
  • Drops a 713 KB embedded DLL. Release exe goes from ~3.6 MB to ~2.6 MB.
  • Removes the Unspecified-Kind workaround from Fix automatic countdown being skewed by the UTC offset #146 since the port compares ticks directly. A test pins that Kind is ignored.
  • Removes the Humanizer entry from the credits list in Settings.

Commit 2: wording

  • Future phrases read "in 3 days", "in an hour", "in a minute" instead of "3 days from now".
  • Single units share one article: "a second", "a month", "a year" alongside the existing "a minute" / "an hour".
  • "now", "tomorrow", "yesterday" and all past phrases are unchanged.

Humanizer was only used for the automatic countdown phrase and the
countdown target preview, both English-only. RelativeTimeFormatter
ports Humanizer 3.0.10's default DateTime algorithm and English strings
exactly, verified against the library with a sweep of ~450k offsets
across several anchor dates before removing it.

Dropping the package removes a 713 KB embedded DLL and takes the
Release exe from about 3.6 MB to 2.6 MB. It also removes the
Unspecified-Kind workaround from #146 since the port compares ticks
directly.
Future countdowns now read "in 3 days", "in an hour", "in a minute".
Past ones still read "3 days ago". Single units use the same article
throughout ("a second", "a month", "a year") instead of mixing
"one second" with "a minute".

"now", "tomorrow" and "yesterday" are unchanged.
Signed-off-by: Daniel Chalmers <daniel.chalmers@outlook.com>
@danielchalmers
danielchalmers merged commit fb1325b into master Sep 21, 2026
4 checks passed
@danielchalmers
danielchalmers deleted the claude/humanizer-replacement-feasibility-281906 branch September 21, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant