Slightly strange question, but hopefully someone can help.
In essence, if the time was 12pm the the elapsed percentage would be 50%, 6am would be 25% and 16pm would
The accepted answer bugs me for many reasons including the relationship to a real life calendar. Personally, I would probably do this:
result:
72.22% of the day has passed (62402 out of 86400 seconds)
You could then extend it even further by making a function and changing the range from "today"
and "tomorrow"
to something else.