KingAmu'Code

求当前日期是本年的第几周

  public string n_week()
    {
        int days = DateTime.Today.DayOfYear;
        int week = days / 7;
        if (days % 7 > 0) { ++week; }
        return week.ToString();
    }

posted on 2010-02-05 13:54  阿牧  阅读(161)  评论(0编辑  收藏  举报

导航