Inheritance: TemporalDate, IComparable
Exemplo n.º 1
0
 /// <summary>
 /// Determines if two <see cref="Date"/> values are different.
 /// </summary>
 /// <param name="lhs">The <see cref="Date"/> to compare.</param>
 /// <param name="rhs">The <see cref="Date"/> to compare to.</param>
 /// <returns><c>true</c> if the two <see cref="Date"/> values are different.</returns>
 public static bool NotEqual(Date lhs, Date rhs)
 {
     return (!lhs.Equals (rhs));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Compares two <see cref="Date"/> instances to determine if the
 /// first is equal to or smaller than the second.
 /// </summary>
 /// <param name="lhs">The first date.</param>
 /// <param name="rhs">The second date.</param>
 /// <returns><c>true</c> if the first value is less than the second.</returns>
 public static bool LessOrEqual(Date lhs, Date rhs)
 {
     return (lhs.CompareTo (rhs) <= 0);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Compares two <see cref="Date"/> instances to determine if the
 /// first is equal to or larger than the second.
 /// </summary>
 /// <param name="lhs">The first Date.</param>
 /// <param name="rhs">The second Date.</param>
 /// <returns><c>true</c> if the first value is greater than the second.</returns>
 public static bool GreaterOrEqual(Date lhs, Date rhs)
 {
     return (lhs.CompareTo (rhs) >= 0);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Determines if the value of a <see cref="Date"/> is less than
 /// the value of another.
 /// </summary>
 /// <param name="lhs">The <see cref="Date"/> to compare.</param>
 /// <param name="rhs">The <see cref="Date"/> to compare with.</param>
 /// <returns><c>true</c> if the first value is less than the second.</returns>
 public static bool Less(Date lhs, Date rhs)
 {
     return (lhs.CompareTo (rhs) < 0);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Determines if the value of a <see cref="Date"/> is greater than
 /// the value of another.
 /// </summary>
 /// <param name="lhs">The <see cref="Date"/> to compare.</param>
 /// <param name="rhs">The <see cref="Date"/> to compare with.</param>
 /// <returns><c>true</c> if the first value is greater than the second.</returns>
 public static bool Greater(Date lhs, Date rhs)
 {
     return (lhs.CompareTo (rhs) > 0);
 }