I have a date, for example, April 1, 2009. I want to know what a weekday is, that is, April 1 - Monday, Tuesday, etc. Similarly, I want to check the weekday of every day in April.
You can use the DayOfWeek property .
Use property DayOfWeek:
DayOfWeek
new DateTime(2009, 4, 1).DayOfWeek
If your computer language does not optionally have a function DayOfWeek, you can use Zeller Congruence , which returns day-to-week using simple integer arithmetic.
Source: https://habr.com/ru/post/1705637/More articles:GLib hash loop problem - chow to pass int / char to system () the Linux system call - cSetting a registry key for all users in C # - c #Is it safe to store class objects with std :: auto_ptr as its member variable in std :: vector? - c ++A class containing auto_ptr stored in a vector - c ++return multiple columns using Case in Select Satement in Oracle - oraclehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1705639/how-do-you-detect-if-your-website-visitor-came-from-a-google-search-result&usg=ALkJrhhdeWiTDnWtD-4Fu1_yOij1MjF6PgWPF - привязка к значку меню - .netAn error occurred while parsing EntityName - c #VS2008: Testing modules using coverage code does not work with / CLR - clrAll Articles