Skip to content

feat: show live clock as hh:mm without seconds#10

Open
Wegi wants to merge 1 commit into
mainfrom
feat/issue-9-hhmm-display
Open

feat: show live clock as hh:mm without seconds#10
Wegi wants to merge 1 commit into
mainfrom
feat/issue-9-hhmm-display

Conversation

@Wegi

@Wegi Wegi commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Closes #9

What

The live elapsed-time clock (menu bar + popover) now renders as zero-padded hh:mm (e.g. 00:05, 01:23) instead of h:mm:ss.

How

  • TimeFormat moved from the app target (Support.swift) into ConanCore (TimeFormat.swift) so it is covered by the test target — call sites unchanged, views already import ConanCore.
  • TimeFormat.clock drops seconds and zero-pads hours; seconds are floored so a minute only appears once fully elapsed.
  • TimeFormat.human (report formatting) is unchanged, pinned by a regression test.

The constant 5-character width also removes most of the width jumping addressed in #6.

Tests

New TimeFormatTests (TDD, red→green): zero padding, seconds flooring, hour rollover, negative clamping, human regression pin. Full suite: 35 tests green.

Stack note: first of the stacked display PRs (#9#6#3); merge this one first.

Moves TimeFormat into ConanCore so it is covered by the test target,
and changes the live clock format from h:mm:ss to a constant-width
zero-padded hh:mm. Seconds are floored, so a minute only shows once
fully elapsed.
@Wegi Wegi force-pushed the feat/issue-9-hhmm-display branch from 3e9547a to e72fa7f Compare July 11, 2026 08:51
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.

hh:mm Anzeige

1 participant