ソースコード
public static class DateTimeExt
{
public static bool IsMonday( this DateTime self )
{
return date.DayOfWeek == DayOfWeek.Monday;
}
public static bool IsTuesday( this DateTime self )
{
return date.DayOfWeek == DayOfWeek.Tuesday;
}
public static bool IsWednesday( this DateTime self )
{
return date.DayOfWeek == DayOfWeek.Wednesday;
}
public static bool IsThursday( this DateTime self )
{
return date.DayOfWeek == DayOfWeek.Thursday;
}
public static bool IsFriday( this DateTime self )
{
return date.DayOfWeek == DayOfWeek.Friday;
}
public static bool IsSaturday( this DateTime self )
{
return date.DayOfWeek == DayOfWeek.Saturday;
}
public static bool IsSunday( this DateTime self )
{
return date.DayOfWeek == DayOfWeek.Sunday;
}
}