Exemple #1
0
        public static DateTime GetThisWeekStart()
        {
            DateTime date = DateTime.Now;

            date.AddDays(0 - X2DateTime.GetDayOfWeek());
            return(new DateTime(date.Year, date.Month, date.Day, 0, 0, 0));
        }
Exemple #2
0
        public static DateTime GetThisWeekEnd()
        {
            DateTime date = DateTime.Now;

            date.AddDays(7 - X2DateTime.GetDayOfWeek());
            return(new DateTime(date.Year, date.Month, date.Day, 23, 59, 59));
        }
Exemple #3
0
 public static int GetDayOfWeek()
 {
     return(X2DateTime.GetDayOfWeek(DateTime.Now));
 }