Time.Compare(Time, Time) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compare two Time
objects and return a negative number if a
is less than b
, a positive number if a
is greater than
b
, or 0 if they are equal.
[Android.Runtime.Register("compare", "(Landroid/text/format/Time;Landroid/text/format/Time;)I", "")]
public static int Compare (Android.Text.Format.Time? a, Android.Text.Format.Time? b);
[<Android.Runtime.Register("compare", "(Landroid/text/format/Time;Landroid/text/format/Time;)I", "")>]
static member Compare : Android.Text.Format.Time * Android.Text.Format.Time -> int
Parameters
- a
- Time
first Time
instance to compare
- b
- Time
second Time
instance to compare
Returns
a negative result if a
is earlier, a positive result if
b
is earlier, or 0 if they are equal.
- Attributes
Exceptions
if either argument is null
if AllDay is true but hour
, minute
, and second
are not 0.
Remarks
Compare two Time
objects and return a negative number if a
is less than b
, a positive number if a
is greater than b
, or 0 if they are equal.
This method can return an incorrect answer when the date / time fields of either Time
have been set to a local time that contradicts the available timezone information.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.