ToDateTime() public static method

public static ToDateTime ( long ts ) : System.DateTime
ts long
return System.DateTime
Ejemplo n.º 1
0
        static bool SameMonthFilter(long csTimeStamp, long thatTimeStamp)
        {
            var d1 = DateTimeMs.ToDateTime(csTimeStamp).Month;
            var d2 = DateTimeMs.ToDateTime(thatTimeStamp).Month;

            return(d1 != d2);
        }
Ejemplo n.º 2
0
        static bool SameWeekFilter(long csTimeStamp, long thatTimeStamp)
        {
            var d1   = DateTimeMs.ToDateTime(csTimeStamp);
            var d2   = DateTimeMs.ToDateTime(thatTimeStamp);
            var jan1 = (int)new DateTime(d1.Year, 1, 1, 0, 0, 0).DayOfWeek;
            int wk1  = (d1.DayOfYear + jan1 - 2) / 7;
            int wk2  = (d2.DayOfYear + jan1 - 2) / 7;

            return(wk1 != wk2);
        }
Ejemplo n.º 3
0
 static bool SameDayFilter(long csTimeStamp, long thatTimeStamp)
 {
     if (DateTimeMs.ToDateTime(csTimeStamp).Date != DateTimeMs.ToDateTime(thatTimeStamp).Date)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }