Beispiel #1
0
 private static int CompareTo(EssentialsDate d1, EssentialsTime d2)
 {
     return(string.Compare(d1?.Iso8601, d2?.ToString("yyyy-MM-dd"), StringComparison.CurrentCultureIgnoreCase));
 }
Beispiel #2
0
 /// <summary>
 /// Compares the value of this instance to a specified <see cref="EssentialsTime"/> value and returns an
 /// integer that indicates whether this instance is lower than, the same as, or greater than the specified
 /// <see cref="EssentialsTime"/> value.
 /// </summary>
 /// <param name="value">The value to compare to the current instance.</param>
 /// <returns>A signed number indicating the relative values of this instance and the <paramref name="value"/>
 /// parameter.</returns>
 public int CompareTo(EssentialsTime value)
 {
     return(value == null ? 1 : string.Compare(Iso8601, value.ToString("yyyy-MM-dd"), StringComparison.CurrentCultureIgnoreCase));
 }