The Current week dates
Posted
by MoezMousavi
on Geeks with Blogs
See other posts from Geeks with Blogs
or by MoezMousavi
Published on Thu, 16 Dec 2010 22:37:40 GMT
Indexed on
2010/12/18
17:15 UTC
Read the original article
Hit count: 340
Might be a bit vierd as we normaly not writing a multicultural web site. So not very frequently using CultureInfo however, it is actully quite good to use it to get the week days. CultureInfo info = Thread.CurrentThread. DayOfWeek firstday = info.DateTimeFormat. DayOfWeek today = info.Calendar.GetDayOfWeek(Dat int diff = today - firstday; DateTime firstDate = DateTime.Now.AddDays(-diff); DateTime lastDate = firstDate.AddDays(6);The Current week dates
© Geeks with Blogs or respective owner