1 // The incoming parameter is the total number of minutes. If it is the number of seconds, the number of milliseconds, you need to adjust the code of the // part of the total seconds here.
2 function toDateDMS(minutes){
3 // Convert minutes to days, hours, minutes, seconds
4 if(minutes&&!isNaN(minutes)){
5
6 var t = parseFloat(minutes*60); // get the total number of seconds here
7
8 var d,h,m,s; // Define time, minute and second variables (day, hour, minute, second)
9
10 d = Math.floor(t/(24*3600)); // Calculate the number of days
11
12 // Calculate the total number of seconds that have been subtracted
13 t = t-(d*24*3600);
14 h = Math.floor(t/3600); // Calculate hours
15
16 // Calculate the total number of seconds that have been subtracted
17 t = t-(h*3600);
18 m = Math.floor(t/60); // Calculate the number of minutes
19
20 // Calculate the total number of seconds that have been subtracted (actually from top to bottom, where t is already subtracted from the number of hours)
21 t = t-(m*60);
22 s = t; // count seconds
23 return d+"day"+h+"hour"+m+"clock"+s+"second";
twenty four }
25 return "-";
26 }
JavaScript will be divided, seconds, milliseconds converted to xx days xx hours xx seconds (any language common, most easy to understand)