Skip to content

Show a negative sign when a tokenized countdown has passed - #148

Closed
danielchalmers wants to merge 2 commits into
masterfrom
fix/past-countdown-negative-sign
Closed

Show a negative sign when a tokenized countdown has passed#148
danielchalmers wants to merge 2 commits into
masterfrom
fix/past-countdown-negative-sign

Conversation

@danielchalmers

Copy link
Copy Markdown
Owner

Custom TimeSpan format strings drop the sign, so a countdown 3 days past due rendered exactly like 3 days remaining with formats such as {%d}d {%h}h or the new Digital preset.

Fix: format the magnitude and prefix - when the target has passed.

Format, target 90 min ago Before After
{hh}:{mm}:{ss} 01:30:00 -01:30:00
{%h}h {%m}m 1h 30m -1h 30m
c (standard, already signed) -01:30:00 -01:30:00 (no double sign)
  • The Automatic (Humanizer) path already says "ago" and is untouched
  • "Bad format" errors are not prefixed
  • Pre-existing behavior, surfaced by the new one-click presets
  • Note: this touches the same method as Fix automatic countdown being skewed by the UTC offset #146, so whichever merges second needs a trivial rebase

@github-actions github-actions Bot added the enhancement New feature or request label Jul 11, 2026
@danielchalmers

Copy link
Copy Markdown
Owner Author

Not currently planned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant