Skip to content

See issue cited for master branch #2

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Salmonster
Copy link

The original code doesn't always work for 12:00-12:59am/pm. For example, if you use this code as is to find the number of minutes between "3:00pm-12:05am" you will get 1265 minutes for your answer because the program will think that it's counting from 3:00pm until 12:05pm the next day. The answer should be 545 minutes. Exceptions need to be made for the noon and midnight hours because these two hours uniquely spill over into the next am/pm cycle while still counting upward from the previous cycle. This is no longer an issue when 1:00(am or pm) is reached.

See my edits that make exceptions for the 12:00 hours to fix this problem.

The original code doesn't always work for 12:00-12:59am/pm. For example, if you use this code as is to find the number of minutes between "3:00pm-12:05am" you will get 1265 minutes for your answer because the program will think that it's counting from 3:00pm until 12:05pm the next day. The answer should be 545 minutes. Exceptions need to be made for the noon and midnight hours because these two hours uniquely spill over into the next am/pm cycle while still counting upward from the previous cycle. This is no longer an issue when 1:00(am or pm) is reached.

See my edits that make exceptions for the 12:00 hours to fix this problem.
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.

1 participant