mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-05-24 00:52:23 -04:00
19 lines
436 B
C#
19 lines
436 B
C#
using System;
|
|
|
|
namespace API.Helpers;
|
|
|
|
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))!;
|
|
}
|
|
}
|