0
comment
on 12/8/2014 11:20 PM
Rosetta Code has a number of programming tasks with example solutions in multiple languages. One of those tasks is find the last Sunday of each month. Here’s a sample in C#: DateTime date; for (int i = 1; i <= 12; i++) { date = new DateTime(year, i, DateTime.DaysInMonth(year, i), System.Globalization.CultureInfo.CurrentCulture.Calendar); while (date.DayOfWeek != DayOfWeek.Sunday) { date = date.AddDays(-1); } Console.WriteLine(date.ToString("yyyy-MM-dd")); } I thought it might be fun [...]
>> Read the full article on trelford.com
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper