Skip to content

North West | 26-ITP-Sep | Brian Yorachi | Sprint 1 | Exhaustively test and fix formatAs12HourClock - #1655

Open
BrianY315 wants to merge 4 commits into
CodeYourFuture:mainfrom
BrianY315:sprint-1-format-as-12-hour-clock
Open

BrianY315 wants to merge 4 commits into
CodeYourFuture:mainfrom
BrianY315:sprint-1-format-as-12-hour-clock

Conversation

@BrianY315

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1197.

Changelist

Identified tests for important edge cases that use the formatAs12HourClock function and fixed the code so that it works correctly.

Cover valid time boundaries and preserve minutes across conversion.
Pad single-digit afternoon hours and align edge-case test formatting.
Exercise all 1,440 valid HH:mm values against the 12-hour output.
@BrianY315 BrianY315 added 📅 Sprint 1 Assigned during Sprint 1 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 6, 2026
@JaypeeLan JaypeeLan added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 7, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works... but what if the value of time passed is not what you expect? e.g a Boolean or an array. A base case should guard that.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review. The guard issue has been fixed.

@JaypeeLan JaypeeLan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Oct 7, 2026
@JaypeeLan JaypeeLan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants