You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/Jellyfin.Data/DayOfWeekHelper.cs

22 lines
780 B

#pragma warning disable CS1591
using System;
using Jellyfin.Data.Enums;
6 years ago
namespace Jellyfin.Data
6 years ago
{
public static class DayOfWeekHelper
{
public static DayOfWeek[] GetDaysOfWeek(DynamicDayOfWeek day)
6 years ago
{
return day switch
6 years ago
{
DynamicDayOfWeek.Everyday => new[] { DayOfWeek.Sunday, DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday, DayOfWeek.Saturday },
DynamicDayOfWeek.Weekday => new[] { DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday },
DynamicDayOfWeek.Weekend => new[] { DayOfWeek.Sunday, DayOfWeek.Saturday },
_ => new[] { (DayOfWeek)day }
};
6 years ago
}
}
}