Kavita+ Overhaul & New Changelog (#3507)
This commit is contained in:
parent
d880c1690c
commit
a5707617f2
249 changed files with 14775 additions and 2300 deletions
18
API/Helpers/DayOfWeekHelper.cs
Normal file
18
API/Helpers/DayOfWeekHelper.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
|
||||
namespace API.Extensions;
|
||||
|
||||
public static class DayOfWeekHelper
|
||||
{
|
||||
private static readonly Random Rnd = new();
|
||||
|
||||
/// <summary>
|
||||
/// Returns a random DayOfWeek value.
|
||||
/// </summary>
|
||||
/// <returns>A randomly selected DayOfWeek.</returns>
|
||||
public static DayOfWeek Random()
|
||||
{
|
||||
var values = Enum.GetValues<DayOfWeek>();
|
||||
return (DayOfWeek)values.GetValue(Rnd.Next(values.Length))!;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue