|
@@ -10,9 +10,11 @@
|
|
|
if (sec.HasValue == false) return string.Empty;
|
|
|
var ts = TimeSpan.FromSeconds(sec.Value);
|
|
|
|
|
|
- return ts.Hours > 0
|
|
|
- ? $"{Math.Floor(ts.TotalHours):00}:{ts.Minutes:00}:{ts.Seconds:00}"
|
|
|
- : $"{Math.Floor(ts.TotalMinutes):00}:{ts.Seconds:00}";
|
|
|
+ return Math.Floor(ts.TotalDays) >= 1
|
|
|
+ ? $"{Math.Floor(ts.TotalDays):00}.{ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}"
|
|
|
+ : Math.Floor(ts.TotalHours) >= 1
|
|
|
+ ? $"{Math.Floor(ts.TotalHours):00}:{ts.Minutes:00}:{ts.Seconds:00}"
|
|
|
+ : $"{Math.Floor(ts.TotalMinutes):00}:{ts.Seconds:00}";
|
|
|
}
|
|
|
|
|
|
public static string BytesToFileSize(this long length) => ((long?)length).BytesToFileSize();
|