Skip to content

Manchester | 26-ITP-Sept | Aklilu Tsehaye | Sprint 1 | Format clock edge cases - #1656

Open
AkliluMihtsun wants to merge 2 commits into
CodeYourFuture:mainfrom
AkliluMihtsun:format-clock-edge-cases
Open

AkliluMihtsun wants to merge 2 commits into
CodeYourFuture:mainfrom
AkliluMihtsun:format-clock-edge-cases

Conversation

@AkliluMihtsun

Copy link
Copy Markdown

Learners, PR Template

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

  • I have added some edge cases to try the code
  • I have tested the edge cases using the assert and test methods

@github-actions

This comment has been minimized.

@AkliluMihtsun AkliluMihtsun changed the title Format clock edge cases Manchester | 26-ITP-Sept | Aklilu Tsehaye | Sprint 1 | Format clock edge cases Oct 6, 2026
@AkliluMihtsun AkliluMihtsun added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 6, 2026
@hey-hammad hey-hammad 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

@hey-hammad hey-hammad left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good start. However, please consider the following:

  • What would happen if I pass 1:00, 25:00, or foobar to the function?
  • Consider adding test cases for invalid inputs as well.

Also, using lots of if/else statements can make the logic harder to follow. Is there a simpler way to solve this?

Think about how 24-hour to 12-hour conversion works:

  • What determines whether it's AM or PM?
  • How do we convert a 24-hour time to 12-hour time in everyday life?

@hey-hammad hey-hammad 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants