Abstract
While developing an app the author came across the fact that while calculating time durations, certain variables are often overlooked which can result in errors. This paper provides an algorithm that considers the absolute values of the time slots and after a discrete set of steps results in the accurate time durations. The scope of this research is not limited to hours and minutes but, can be applied to seconds and milliseconds as well.
Highlights
We assumed that calculating the duration between two time slots is easy and can be found by subtracting them
The reality is that certain cases and variables have to be considered before we get the correct answer, which is mentioned in this paper so that it is much easier to calculate the duration between two time slots
I have tried to find out every variable that needs to be considered before we get the correct answer as it is not as straightforward as subtracting two numbers
Summary
We assumed that calculating the duration between two time slots is easy and can be found by subtracting them. I have tried to find out every variable that needs to be considered before we get the correct answer as it is not as straightforward as subtracting two numbers. The need for this algorithm came up when I was developing a native app using Dart, where I had to find the duration between the current time and the time a user has entered which included the Hours and the Minutes.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
More From: International Journal of Innovative Technology and Exploring Engineering
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.