输入日期可以计算星期几

string today = "yourDate";
DateTime day = Convert.ToDateTime(today);
//English
string week = day.DayOfWeek.ToString();
//中文
System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("zh-CN");
string week_cn = "星期"+cultureInfo.DateTimeFormat.GetAbbreviatedDayName(day.DayOfWeek).ToString();

posted @ 2011-03-01 09:51  星火卓越  阅读(228)  评论(0编辑  收藏  举报