Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add format-time exercise #41

Merged
merged 2 commits into from
Oct 21, 2024
Merged

Add format-time exercise #41

merged 2 commits into from
Oct 21, 2024

Conversation

illicitonion
Copy link
Member

@illicitonion illicitonion commented Oct 4, 2024

This follows on from the prep in CodeYourFuture/curriculum#1033.

This follows on from the prep.
Copy link
Member

@SallyMcGrath SallyMcGrath left a comment

Choose a reason for hiding this comment

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

TY sorry for missing this

function formatAs12HourClock(time) {
const hours = Number(time.slice(0, 2));
if (hours > 12) {
return `${hours - 12}:00 pm`;
Copy link
Member

Choose a reason for hiding this comment

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

Fun fact: this is exactly how my 7 year old niece does this calculation

Sprint-2/readme.md Outdated Show resolved Hide resolved
@SallyMcGrath SallyMcGrath merged commit 3de19b0 into main Oct 21, 2024
@SallyMcGrath SallyMcGrath deleted the format-time branch October 21, 2024 18:38
ArminNouri98 added a commit to ArminNouri98/Module-Structuring-and-Testing-Data that referenced this pull request Nov 12, 2024
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.

2 participants