feat: wip.
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
|
||||
public interface IDateSelector
|
||||
{
|
||||
public bool IsValid(DateTime? date);
|
||||
public bool Match(DateTime? date);
|
||||
}
|
||||
|
||||
public class WeekendDateSelector: IDateSelector
|
||||
{
|
||||
public static WeekendDateSelector Instance { get; } = new WeekendDateSelector();
|
||||
|
||||
public bool IsValid(DateTime? date)
|
||||
public bool Match(DateTime? date)
|
||||
{
|
||||
if (date is null) return false;
|
||||
return date.Value.DayOfWeek == DayOfWeek.Saturday || date.Value.DayOfWeek == DayOfWeek.Sunday;
|
||||
|
||||
Reference in New Issue
Block a user