muffin v7.5.11
This commit is contained in:
parent
addf2d530f
commit
3102923ce2
522 changed files with 41082 additions and 211592 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Questionable.Controller.Utils;
|
||||
|
||||
|
|
@ -17,83 +16,31 @@ internal static class ExpiryUtils
|
|||
public static DateTime NormalizeExpiry(DateTime expiry)
|
||||
{
|
||||
TimeSpan timeOfDay = expiry.TimeOfDay;
|
||||
int num = ((timeOfDay == TimeSpan.Zero) ? (-1551554143) : (-1551554139));
|
||||
while (true)
|
||||
if (timeOfDay == TimeSpan.Zero || timeOfDay == EndOfDaySentinel)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1551554143;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return expiry.ToUniversalTime();
|
||||
case 4:
|
||||
num = ((!(timeOfDay == EndOfDaySentinel)) ? (-1551554140) : (-1551554143));
|
||||
break;
|
||||
case 5:
|
||||
num = ((expiry.Kind == DateTimeKind.Utc) ? (-1551554141) : (-1551554144));
|
||||
break;
|
||||
case 2:
|
||||
return expiry;
|
||||
case 0:
|
||||
return AtDailyReset(DateOnly.FromDateTime(expiry));
|
||||
case 3:
|
||||
num = -1551554139;
|
||||
break;
|
||||
}
|
||||
return AtDailyReset(DateOnly.FromDateTime(expiry));
|
||||
}
|
||||
if (expiry.Kind != DateTimeKind.Utc)
|
||||
{
|
||||
return expiry.ToUniversalTime();
|
||||
}
|
||||
return expiry;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static string FormatTimeSpan(TimeSpan timeSpan)
|
||||
{
|
||||
int num = ((!(timeSpan.TotalMinutes < 1.0)) ? (-1793359174) : (-1793359173));
|
||||
while (true)
|
||||
if (timeSpan.TotalMinutes < 1.0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1793359176;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 5:
|
||||
{
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(1, 1);
|
||||
defaultInterpolatedStringHandler.AppendFormatted(timeSpan.Minutes);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._200B_206B_206B_200E_200B_206A_206D_206B_206E_200F_206A_206F_206E_202B_200F_206C_202B_206D_206E_200F_200C_200E_206F_200D_200F_200B_202B_202B_202B_202B_206D_202C_206A_206D_200B_206E_200D_206A_206F_200F_202E<string>(120194306));
|
||||
return defaultInterpolatedStringHandler.ToStringAndClear();
|
||||
}
|
||||
case 3:
|
||||
return global::_003CModule_003E._202A_206B_206D_200C_206B_200E_200E_202A_200B_202E_206A_206F_206A_206B_200E_200D_200F_206D_206E_206A_206F_200C_206C_202C_202A_206E_202C_200B_206E_202A_206E_202B_206B_202E_202E_206A_206D_206D_202C_200F_202E<string>(-610084152);
|
||||
case 0:
|
||||
num = ((!(timeSpan.TotalDays < 1.0)) ? (-1793359170) : (-1793359175));
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler3 = new DefaultInterpolatedStringHandler(3, 2);
|
||||
defaultInterpolatedStringHandler3.AppendFormatted(timeSpan.Hours);
|
||||
defaultInterpolatedStringHandler3.AppendLiteral(global::_003CModule_003E._202E_206C_200F_206B_206A_202A_202C_206F_200C_206C_202B_206B_206D_206D_206D_202D_206E_202E_206C_206E_206D_202C_206F_200D_202D_202E_206A_206D_202A_206A_202B_200D_200C_206D_202B_200B_200D_200C_206E_206B_202E<string>(-794677548));
|
||||
defaultInterpolatedStringHandler3.AppendFormatted(timeSpan.Minutes);
|
||||
defaultInterpolatedStringHandler3.AppendLiteral(global::_003CModule_003E._200B_206B_206B_200E_200B_206A_206D_206B_206E_200F_206A_206F_206E_202B_200F_206C_202B_206D_206E_200F_200C_200E_206F_200D_200F_200B_202B_202B_202B_202B_206D_202C_206A_206D_200B_206E_200D_206A_206F_200F_202E<string>(120194306));
|
||||
return defaultInterpolatedStringHandler3.ToStringAndClear();
|
||||
}
|
||||
case 4:
|
||||
num = -1793359173;
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler2 = new DefaultInterpolatedStringHandler(3, 2);
|
||||
defaultInterpolatedStringHandler2.AppendFormatted((int)timeSpan.TotalDays);
|
||||
defaultInterpolatedStringHandler2.AppendLiteral(global::_003CModule_003E._202E_206C_200F_206B_206A_202A_202C_206F_200C_206C_202B_206B_206D_206D_206D_202D_206E_202E_206C_206E_206D_202C_206F_200D_202D_202E_206A_206D_202A_206A_202B_200D_200C_206D_202B_200B_200D_200C_206E_206B_202E<string>(-70794689));
|
||||
defaultInterpolatedStringHandler2.AppendFormatted(timeSpan.Hours);
|
||||
defaultInterpolatedStringHandler2.AppendLiteral(global::_003CModule_003E._200B_206B_206B_200E_200B_206A_206D_206B_206E_200F_206A_206F_206E_202B_200F_206C_202B_206D_206E_200F_200C_200E_206F_200D_200F_200B_202B_202B_202B_202B_206D_202C_206A_206D_200B_206E_200D_206A_206F_200F_202E<string>(-568294376));
|
||||
return defaultInterpolatedStringHandler2.ToStringAndClear();
|
||||
}
|
||||
case 2:
|
||||
num = ((!(timeSpan.TotalHours < 1.0)) ? (-1793359176) : (-1793359171));
|
||||
break;
|
||||
}
|
||||
return "< 1m";
|
||||
}
|
||||
if (!(timeSpan.TotalHours < 1.0))
|
||||
{
|
||||
if (!(timeSpan.TotalDays < 1.0))
|
||||
{
|
||||
return $"{(int)timeSpan.TotalDays}d {timeSpan.Hours}h";
|
||||
}
|
||||
return $"{timeSpan.Hours}h {timeSpan.Minutes}m";
|
||||
}
|
||||
return $"{timeSpan.Minutes}m";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue