mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 23:31:13 -05:00
-added back player history graphs (past 12 hours every 15 minutes)
-fixed issue with configurationmanager files and threading -servers on webfront listed in descending player count -fixed resolution of tempban times from console feedback -Added tests plugin to simulate functionality
This commit is contained in:
@ -293,16 +293,18 @@ namespace SharedLibrary
|
||||
|
||||
public static string TimeSpanText(this TimeSpan span)
|
||||
{
|
||||
if (span.TotalMinutes < 6)
|
||||
return $"{span.Minutes} minutes";
|
||||
else if (span.TotalHours < 24)
|
||||
return $"{span.Hours} hours";
|
||||
else if (span.TotalDays < 7)
|
||||
return $"{span.Days} days";
|
||||
else if (span.TotalDays > 7 && span.TotalDays < 365)
|
||||
return $"{Math.Ceiling(span.Days / 7.0)} weeks";
|
||||
else if (span.TotalDays >= 365)
|
||||
return $"{Math.Ceiling(span.Days / 365.0)} years";
|
||||
if (span.TotalMinutes < 60)
|
||||
return $"{span.Minutes} minute(s)";
|
||||
else if (span.Hours >= 1 && span.TotalHours < 24)
|
||||
return $"{span.Hours} hour(s)";
|
||||
else if (span.TotalDays >= 1 && span.TotalDays < 7)
|
||||
return $"{span.Days} day(s)";
|
||||
else if (span.TotalDays >= 7 && span.TotalDays < 365)
|
||||
return $"{Math.Ceiling(span.Days / 7.0)} week(s)";
|
||||
else if (span.TotalDays >= 365 && span.TotalDays < 36500)
|
||||
return $"{Math.Ceiling(span.Days / 365.0)} year(s)";
|
||||
else if (span.TotalDays >= 36500)
|
||||
return "Forever";
|
||||
|
||||
return "1 hour";
|
||||
}
|
||||
|
Reference in New Issue
Block a user