I know how to determine IF a time stamp is “greater than” “equal to” or “less than” using the date function, but I don’t know how to determine HOW MUCH greater than a time is
for instance, how would I tell that 6:15 PM is 15 minutes greater than 6:00 PM
I’ve got an idea to convert times into milliseconds and compare with the current time in milliseconds, but its a fog of potential ideas right now
insight appreciated
see how-to-convert-milliseconds-to-x-mins-x-seconds-in-java
Then you can do something like this…
Also, take a look at Joda at some point. It’s pretty much the de-facto standard for better date and time functions in java. They have some nice convenience methods like
Minutes.minutesBetween(date1,date2)