mirror of
				https://github.com/Kareadita/Kavita.git
				synced 2025-11-03 19:17:05 -05: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))!;
 | 
						|
    }
 | 
						|
}
 |