Share via


DateFormat.Is24HourFormat(Context) Method

Definition

Returns true if times should be formatted as 24 hour times, false if times should be formatted as 12 hour (AM/PM) times.

[Android.Runtime.Register("is24HourFormat", "(Landroid/content/Context;)Z", "")]
public static bool Is24HourFormat (Android.Content.Context? context);
[<Android.Runtime.Register("is24HourFormat", "(Landroid/content/Context;)Z", "")>]
static member Is24HourFormat : Android.Content.Context -> bool

Parameters

context
Context

the context to use for the content resolver

Returns

true if 24 hour time format is selected, false otherwise.

Attributes

Remarks

Returns true if times should be formatted as 24 hour times, false if times should be formatted as 12 hour (AM/PM) times. Based on the user's chosen locale and other preferences.

Java documentation for android.text.format.DateFormat.is24HourFormat(android.content.Context).

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.

Applies to