Skip to content

Check if DateTime Is Weekend or Weekday: update to .NET 10 - #2356

Merged
vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/61082-csharp-datetime-weekend-weekday
Nov 4, 2026
Merged

vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/61082-csharp-datetime-weekend-weekday

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Retargets the CheckDateTimeIsWeekend sample to net10.0 with MSTest 4.5.2, adds a DateTimeExtensions class with two IsWeekend overloads (Saturday and Sunday, and a caller-supplied set of weekend days), modernises Program.cs to top-level statements with the invariant culture, and rewrites the tests so they call the sample's methods instead of repeating its logic, with new tests for the Friday-Saturday overload, the DayOfWeek integer values, the day name under a German culture and DateOnly.DayOfWeek.

…methods

Retarget to net10.0, update MSTest to 4.5.2, add DateTimeExtensions with IsWeekend overloads, and make the tests call the sample instead of copying its logic.
@vladimir-pecanac-main
vladimir-pecanac-main merged commit 5b72a1f into CodeMazeBlog:main Nov 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant