ToDateTime() 공개 정적인 메소드

public static ToDateTime ( long ts ) : System.DateTime
ts long
리턴 System.DateTime
예제 #1
0
        static bool SameMonthFilter(long csTimeStamp, long thatTimeStamp)
        {
            var d1 = DateTimeMs.ToDateTime(csTimeStamp).Month;
            var d2 = DateTimeMs.ToDateTime(thatTimeStamp).Month;

            return(d1 != d2);
        }
예제 #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);
        }
예제 #3
0
 static bool SameDayFilter(long csTimeStamp, long thatTimeStamp)
 {
     if (DateTimeMs.ToDateTime(csTimeStamp).Date != DateTimeMs.ToDateTime(thatTimeStamp).Date)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }