WeekHelper.cs 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Bowin.Common.Utility
  6. {
  7. public class WeekHelper
  8. {
  9. private static Dictionary<int, string> _weekDictionary;
  10. public static Dictionary<int, string> WeekDictionary
  11. {
  12. get
  13. {
  14. if (_weekDictionary == null)
  15. {
  16. _weekDictionary = new Dictionary<int, string>();
  17. _weekDictionary.Add((int)DayOfWeek.Monday, "星期一");
  18. _weekDictionary.Add((int)DayOfWeek.Tuesday, "星期二");
  19. _weekDictionary.Add((int)DayOfWeek.Wednesday, "星期三");
  20. _weekDictionary.Add((int)DayOfWeek.Thursday, "星期四");
  21. _weekDictionary.Add((int)DayOfWeek.Friday, "星期五");
  22. _weekDictionary.Add((int)DayOfWeek.Saturday, "星期六");
  23. _weekDictionary.Add((int)DayOfWeek.Sunday, "星期日");
  24. }
  25. return _weekDictionary;
  26. }
  27. }
  28. }
  29. }