asp.net

C#获取星期几的函数,asp.net获取星期

2013-06-18

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
///week 的摘要说明
/// </summary>
public class week
{
    public static string Geteek()
    {
            string[] weekdays = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
            string week = weekdays[Convert.ToInt32(DateTime.Now.DayOfWeek)];
            return week;
    }

}