All problems

Single-digit seconds shorten elapsed labels in music roll previews

Level 1 · node · API · Missing fixed two-digit seconds in elapsed time responses

Scenario

A fictional mechanical instrument workshop provides a preview list of section start times for paper music rolls. The display uses strings showing elapsed minutes and seconds. A section starting at one minute and five seconds displays as 1:5, inconsistent with the format of other sections. Review the time formatter and list response.

Requirements

Input is an array of section names and nonnegative safe integer seconds. Each section response must provide name, seconds and label in input order. The label shows total minutes as a decimal integer and always exactly two digits for seconds after the colon. Durations of 60 minutes or more still use total minutes. Do not modify input.

Acceptance criteria

  • Seconds of 10 or more retain their existing two-digit representation.
  • Seconds from 0 to 9 are padded with zero after the colon to make two digits.
  • Durations of 60 minutes or more retain total minutes, original section order and seconds values.