DateFormatSymbols.GetMonths Method

Definition

Gets month strings.

[Android.Runtime.Register("getMonths", "()[Ljava/lang/String;", "GetGetMonthsHandler")]
public virtual string[]? GetMonths ();
[<Android.Runtime.Register("getMonths", "()[Ljava/lang/String;", "GetGetMonthsHandler")>]
abstract member GetMonths : unit -> string[]
override this.GetMonths : unit -> string[]

Returns

String[]

the month strings.

Attributes

Remarks

Gets month strings. For example: "January", "February", etc. An array with either 12 or 13 elements will be returned depending on whether or not java.util.Calendar#UNDECIMBER Calendar.UNDECIMBER is supported. Use java.util.Calendar#JANUARY Calendar.JANUARY, java.util.Calendar#FEBRUARY Calendar.FEBRUARY, etc. to index the result array.

If the language requires different forms for formatting and stand-alone usages, this method returns month names in the formatting form. For example, the preferred month name for January in the Czech language is <em>ledna</em> in the formatting form, while it is <em>leden</em> in the stand-alone form. This method returns "ledna" in this case. Refer to the Calendar Elements in the Unicode Locale Data Markup Language (LDML) specification for more details.

Java documentation for java.text.DateFormatSymbols.getMonths().

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