Decimal Time of Day Conversion Introduction
Time is confusing. Sixty seconds to a minute, sixty minutes to an hour, twenty-four hours to a day (and not to mention that pesky am/pm!).
There's no room for such silliness nowadays, so we've decided to adopt the only sensible alternative: decimal days! That is to say, each day is considered 1 whole unit, and anything shorter is written as a decimal fraction of that day. So, for example: &quot;12:00:00&quot; would be written as &quot;0.5&quot;, and &quot;01:23:45&quot; might be written as &quot;0.058159&quot;.
Because it will take time to get used to the new system, you are tasked with writing a program that can convert between them in both directions.
Challenge
Write a program in the language of your choice, that given a modern time in the ISO-8601 format of &quot;hh:mm:ss&quot;, will return the equivalent decimal fraction unit. Likewise, given a decimal fraction, the program should return the time in the modern format initially specified.
You can make the following assumptions:

The modern time input and output can range from &quot;00:00:00&quot; to &quot;24:00:00&quot;
The decimal time input and output can range from &quot;0&quot; to &quot;1&quot;, and should be able to accept/output up to at least 5 decimal places (such as &quot;0.12345&quot;). More precision is acceptable
The program should be able to know which conversion direction to perform based on input
You cannot use time related functions/libraries

The winner will be determined by the shortest code that accomplishes the criteria. They will be selected in at least 7 decimal day units, or if/when there have been enough submissions.
Examples
Here's a(n intentionally) poorly written piece of JavaScript code to be used as an example:
function decimalDay(hms) {
    var x, h, m, s;
    if (typeof hms === 'string' &amp;&amp; hms.indexOf(':') &gt; -1) {
        x = hms.split(':');
        return (x[0] * 3600 + x[1] * 60 + x[2] * 1) / 86400;
    }
    h = Math.floor(hms * 24) % 24;
    m = Math.floor(hms * 1440) % 60;
    s = Math.floor(hms * 86400) % 60;
    return (h &gt; 9 ? '' : '0') + h + ':' + (m &gt; 9 ? '' : '0') + m + ':' + (s &gt; 9 ? '' : '0') + s;
}
decimalDay('02:57:46'); // 0.12344907407407407
decimalDay('23:42:12'); // 0.9876388888888888
decimalDay(0.5); // 12:00:00
decimalDay(0.05816); // 01:23:45
CJam, 58 56 42 bytes

I am sure this is too long and can be golfed a lot. But here goes for starters:

86400q':/:d_,({60bd\/}{~*i60b{s2Ue[}%':*}?


Try it online here