Share via


TextClock.Format12HourFormatted Property

Definition

Returns the formatting pattern used to display the date and/or time in 12-hour mode. -or- Specifies the formatting pattern used to display the date and/or time in 12-hour mode.

public virtual Java.Lang.ICharSequence? Format12HourFormatted { [Android.Runtime.Register("getFormat12Hour", "()Ljava/lang/CharSequence;", "GetGetFormat12HourHandler")] get; [Android.Runtime.Register("setFormat12Hour", "(Ljava/lang/CharSequence;)V", "GetSetFormat12Hour_Ljava_lang_CharSequence_Handler")] set; }
[<get: Android.Runtime.Register("getFormat12Hour", "()Ljava/lang/CharSequence;", "GetGetFormat12HourHandler")>]
[<set: Android.Runtime.Register("setFormat12Hour", "(Ljava/lang/CharSequence;)V", "GetSetFormat12Hour_Ljava_lang_CharSequence_Handler")>]
member this.Format12HourFormatted : Java.Lang.ICharSequence with get, set

Property Value

A CharSequence or null.

Attributes

Remarks

Property getter documentation:

Returns the formatting pattern used to display the date and/or time in 12-hour mode. The formatting pattern syntax is described in DateFormat.

Java documentation for android.widget.TextClock.getFormat12Hour().

Property setter documentation:

Specifies the formatting pattern used to display the date and/or time in 12-hour mode. The formatting pattern syntax is described in DateFormat.

If this pattern is set to null, #getFormat24Hour() will be used even in 12-hour mode. If both 24-hour and 12-hour formatting patterns are set to null, the default pattern for the current locale will be used instead.

<strong>Note:</strong> if styling is not needed, it is highly recommended you supply a format string generated by DateFormat#getBestDateTimePattern(java.util.Locale, String). This method takes care of generating a format string adapted to the desired locale.

Java documentation for android.widget.TextClock.setFormat12Hour(java.lang.CharSequence).

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

See also