Inheritance: IImmutableTime, IComparable
Ejemplo n.º 1
0
 /// <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));
 }
Ejemplo n.º 2
0
 /// <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));
 }
Ejemplo n.º 3
0
 /// <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;
 }
Ejemplo n.º 4
0
 /// <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;
 }
Ejemplo n.º 5
0
 /// <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;
 }
Ejemplo n.º 6
0
 /// <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;
 }