I work during weekdays after school. I wanted to calculate the amount of hours I worked in the most efficient way possible. Previously, I would manually use a calculator to check my hours. This was taking too much time so I decided to make my own calculator that would calculate the hours. After doing that, I would just multiply the hours by my hourly rate.
The numbers in the brackets are the total minutes for that day. The numbers I enter like "800" and "527" are 8:00 PM and 5:27 PM. I chose not to add anything for AM because I never work in the mornings. So having only PM in my code is easier.