FridayThirteenth.cs 480 B

1234567891011121314151617
  1. using Content.Server.Holiday.Interfaces;
  2. using JetBrains.Annotations;
  3. namespace Content.Server.Holiday.ShouldCelebrate
  4. {
  5. /// <summary>
  6. /// For Friday the 13th. Spooky!
  7. /// </summary>
  8. [UsedImplicitly]
  9. public sealed partial class FridayThirteenth : IHolidayShouldCelebrate
  10. {
  11. public bool ShouldCelebrate(DateTime date, HolidayPrototype holiday)
  12. {
  13. return date.Day == 13 && date.DayOfWeek == DayOfWeek.Friday;
  14. }
  15. }
  16. }