public int CompareTo(ApiDateTime other)
 {
     if (other == null)
     {
         return(1);
     }
     return(UtcTime.CompareTo(other.UtcTime));
 }
Beispiel #2
0
        /// <summary>
        /// Compares the CalendarTime.
        /// </summary>
        /// <since_tizen> 4 </since_tizen>
        /// <param name="other">The CalendarTime to be compared.</param>
        /// <returns>
        /// A 32-bit signed integer that indicates the relative order of the objects being compared.
        /// </returns>
        public int CompareTo(CalendarTime other)
        {
            if (_type != other._type)
            {
                Log.Error(Globals.LogTag, "Not to compare with different type");
                throw CalendarErrorFactory.GetException((int)CalendarError.InvalidParameter);
            }

            if (_type == (int)Type.Utc)
            {
                return(UtcTime.CompareTo(other.UtcTime));
            }
            else
            {
                return(LocalTime.CompareTo(other.LocalTime));
            }
        }
 public int CompareTo(ApiDateTime other)
 {
     if (other == null) return 1;
     return UtcTime.CompareTo(other.UtcTime);
 }
Beispiel #4
0
 public int CompareTo(LocalTime other)
 {
     return(UtcTime.CompareTo(other.UtcTime));
 }