You can change the working time.
(DateTime.Now.Hour % 12) +1 >= 10 && (DateTime.Now.Hour % 12) +1 < 13
Perhaps even without a second check.
I donβt think you can improve much more than looking for other methods such as other answers
Update I tested the above and incorrectly, but it is more sadistic and works
var check = (DateTime.Now.Hours - 10 % 12) % 10; var checkV = (DateTime.Now.Hours >= 10 && check < 3);
Test code
for (int i = 0; i < 24; i++) { var check = (i - 10 % 12) % 10; bool checkV = (i >= 10 && check < 3); Console.WriteLine(i.ToString() + ": " + checkV.ToString()); } Console.ReadKey();
Update 2 Full Abbreviated Code
if( (int)DateTime.Now.DayOfWeek < 5 && DateTime.Now.Hours >= 10 && ((DateTime.Now.Hours - 10 % 12) % 10) < 3)
Sayse source share