Skip to content

Instantly share code, notes, and snippets.

View patHyatt's full-sized avatar
🎂
the noobiest of cakes

Patrick Hyatt patHyatt

🎂
the noobiest of cakes
View GitHub Profile
@patHyatt
patHyatt / main-setup.md
Last active May 16, 2023 16:50
development settings
@patHyatt
patHyatt / gist:7949513
Last active December 31, 2015 06:48
Code to obtain last Wednesday of month
int year = DateTime.Now.Year;
int month = DateTime.Now.Month;
int lastDay = DateTime.DaysInMonth(year, month);
DateTime current = new DateTime(year, month, lastDay);
while (current.DayOfWeek != DayOfWeek.Wednesday)
current = current.AddDays(-1);
//current should have last wed.