Add GetShortHumanReadable for TimeSpan
This commit is contained in:
parent
3f2599171e
commit
eaa5b1a177
1 changed files with 3 additions and 0 deletions
|
|
@ -494,6 +494,9 @@ public static class UniversalExtensions
|
||||||
public static string GetShortHumanReadable(this long seconds, TimeFormat timeFormat = TimeFormat.DAYS) =>
|
public static string GetShortHumanReadable(this long seconds, TimeFormat timeFormat = TimeFormat.DAYS) =>
|
||||||
TimeSpan.FromSeconds(seconds).GetShortTimeFormat(timeFormat);
|
TimeSpan.FromSeconds(seconds).GetShortTimeFormat(timeFormat);
|
||||||
|
|
||||||
|
public static string GetShortHumanReadable(this TimeSpan timespan, TimeFormat timeFormat = TimeFormat.DAYS) =>
|
||||||
|
timespan.GetShortTimeFormat(timeFormat);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue