/// <summary> /// Determines if this <b>TimeValue</b> instance and another hold the /// same date. /// </summary> /// <param name="other">The <b>TimeValue</b> instance to compare with.</param> /// <returns><b>true</b> if both instances represent the same date, /// <b>false</b> otherwise.</returns> public bool Equals(TimeValue other) { return ((hours == other.hours) && (minutes == other.minutes) && (seconds == other.seconds)); }
/// <summary> /// Returns the result of comparing this instance to another <b>TimeValue</b>. /// </summary> /// <param name="other">The <b>TimeValue</b> instance to compare with.</param> /// <returns>An integer value indicating the relative ordering.</returns> public int CompareTo(TimeValue other) { if (hours != other.hours) return (hours - other.hours); if (minutes != other.minutes) return (minutes - other.minutes); return (seconds.CompareTo (other.seconds)); }
/// <summary> /// Constructs a <b>DateTime</b> instance from its date, time and /// time zone components. /// </summary> /// <param name="dateValue">The <see cref="DateValue"/> component.</param> /// <param name="timeValue">The <see cref="TimeValue"/> component.</param> /// <param name="timeZone">The <see cref="TimeZone"/> component or <b>null</b>.</param> internal DateTime(DateValue dateValue, TimeValue timeValue, TimeZone timeZone) : base(timeZone) { this.dateValue = dateValue; this.timeValue = timeValue; }
/// <summary> /// Constructs a <b>Time</b> from its time and time zone components. /// </summary> /// <param name="timeValue">The <see cref="TimeValue"/> component.</param> /// <param name="timeZone">The <see cref="TimeZone"/> component or <b>null</b></param> internal Time(TimeValue timeValue, TimeZone timeZone) : base(timeZone) { this.timeValue = timeValue; }