mirror of
https://github.com/sphildreth/roadie
synced 2024-11-26 22:20:21 +00:00
19 lines
420 B
C#
19 lines
420 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Text;
|
|||
|
|
|||
|
namespace Roadie.Library.Extensions
|
|||
|
{
|
|||
|
public static class TimeSpanExt
|
|||
|
{
|
|||
|
public static string ToDuration(this TimeSpan input)
|
|||
|
{
|
|||
|
if(input == null || input.TotalMilliseconds == 0)
|
|||
|
{
|
|||
|
return "--/--/--";
|
|||
|
}
|
|||
|
return input.ToString(@"ddd\.hh\:mm\:ss");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|