+ return LocalTime.CompareTo(other.LocalTime);
+ }
+
+ /// <summary>
+ /// Equals CalendarTime
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ /// <param name="obj">The CalendarTime to be compared</param>
+ /// <returns>
+ /// A 32-bit signed integer that indicates the relative order of the objects being compared.
+ /// </returns>
+ public override bool Equals(object obj)
+ {
+ var other = obj as CalendarTime;
+ if (_type != other._type)
+ {
+ Log.Error(Globals.LogTag, "Not to compare with different type");
+ return false;
+ }
+
+ if (_type == (int)Type.Utc)
+ return UtcTime.Equals(other.UtcTime);
+ else
+ return LocalTime.Equals(other.LocalTime);
+ }
+
+ /// <summary>
+ /// GetHashCode CalendarTime
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ /// <returns>
+ /// A hash code for the current object.
+ /// </returns>
+ public override int GetHashCode()
+ {
+ if (_type == (int)Type.Utc)
+ return this.UtcTime.GetHashCode();
+ else
+ return this.LocalTime.GetHashCode();