Share via


SimpleDateFormat Class

Definition

<strong>[icu enhancement]</strong> ICU's replacement for java.text.SimpleDateFormat.

[Android.Runtime.Register("android/icu/text/SimpleDateFormat", ApiSince=24, DoNotGenerateAcw=true)]
public class SimpleDateFormat : Android.Icu.Text.DateFormat
[<Android.Runtime.Register("android/icu/text/SimpleDateFormat", ApiSince=24, DoNotGenerateAcw=true)>]
type SimpleDateFormat = class
    inherit DateFormat
Inheritance
Attributes

Remarks

<strong>[icu enhancement]</strong> ICU's replacement for java.text.SimpleDateFormat.&nbsp;Methods, fields, and other functionality specific to ICU are labeled '<strong>[icu]</strong>'.

SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner. It allows for formatting (date -&gt; text), parsing (text -&gt; date), and normalization.

Clients are encouraged to create a date-time formatter using DateFormat.getDateInstance(), DateFormat.getDateInstance(), or DateFormat.getDateTimeInstance() rather than explicitly constructing an instance of SimpleDateFormat. This way, the client is guaranteed to get an appropriate formatting pattern for whatever locale the program is running in. If the client needs more control, they should consider using DateFormat.getInstanceForSkeleton(). However, if the client needs something more unusual than the default patterns in the locales, he can construct a SimpleDateFormat directly and give it an appropriate pattern (or use one of the factory methods on DateFormat and modify the pattern after the fact with toPattern() and applyPattern(). For more information on using these methods, see DateFormat.

<strong>Date and Time Patterns:</strong>

Date and time formats are specified by <em>date and time pattern</em> strings. The full syntax for date and time patterns can be found at https://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns.

Within date and time pattern strings, all unquoted ASCII letters [A-Za-z] are reserved as pattern letters representing calendar fields. Some of the most commonly used pattern letters are:

<blockquote> <table border="1"> <tr> <th style="text-align: center">Sym.</th> <th style="text-align: center">No.</th> <th>Example</th> <th>Description</th> </tr> <tr> <td style="text-align: center">G</td> <td style="text-align: center">1..3</td> <td>AD</td> <td>Era - Replaced with the Era string for the current date. One to three letters for the abbreviated form, four letters for the long (wide) form, five for the narrow form.</td> </tr> <tr> <td style="text-align: center">y</td> <td style="text-align: center">1..n</td> <td>1996</td> <td>Year. Normally the length specifies the padding, but for two letters it also specifies the maximum length. Example:<div style="text-align: center"> <center> <table border="1" cellpadding="2" cellspacing="0"> <tr> <th>Year</th> <th style="text-align: right">y</th> <th style="text-align: right">yy</th> <th style="text-align: right">yyy</th> <th style="text-align: right">yyyy</th> <th style="text-align: right">yyyyy</th> </tr> <tr> <td>AD 1</td> <td style="text-align: right">1</td> <td style="text-align: right">01</td> <td style="text-align: right">001</td> <td style="text-align: right">0001</td> <td style="text-align: right">00001</td> </tr> <tr> <td>AD 12</td> <td style="text-align: right">12</td> <td style="text-align: right">12</td> <td style="text-align: right">012</td> <td style="text-align: right">0012</td> <td style="text-align: right">00012</td> </tr> <tr> <td>AD 123</td> <td style="text-align: right">123</td> <td style="text-align: right">23</td> <td style="text-align: right">123</td> <td style="text-align: right">0123</td> <td style="text-align: right">00123</td> </tr> <tr> <td>AD 1234</td> <td style="text-align: right">1234</td> <td style="text-align: right">34</td> <td style="text-align: right">1234</td> <td style="text-align: right">1234</td> <td style="text-align: right">01234</td> </tr> <tr> <td>AD 12345</td> <td style="text-align: right">12345</td> <td style="text-align: right">45</td> <td style="text-align: right">12345</td> <td style="text-align: right">12345</td> <td style="text-align: right">12345</td> </tr> </table> </center></div> </td> </tr> <tr> <td rowspan="3" style="text-align: center">Q</td> <td style="text-align: center">1..2</td> <td>02</td> <td rowspan="3">Quarter - Use one or two for the numerical quarter, three for the abbreviation, or four for the full (wide) name (five for the narrow name is not yet supported).</td> </tr> <tr> <td style="text-align: center">3</td> <td>Q2</td> </tr> <tr> <td style="text-align: center">4</td> <td>2nd quarter</td> </tr> <tr> <td rowspan="4" style="text-align: center">M</td> <td style="text-align: center">1..2</td> <td>09</td> <td rowspan="4">Month - Use one or two for the numerical month, three for the abbreviation, four for the full (wide) name, or five for the narrow name. With two ("MM"), the month number is zero-padded if necessary (e.g. "08").</td> </tr> <tr> <td style="text-align: center">3</td> <td>Sep</td> </tr> <tr> <td style="text-align: center">4</td> <td>September</td> </tr> <tr> <td style="text-align: center">5</td> <td>S</td> </tr> <tr> <td style="text-align: center">d</td> <td style="text-align: center">1..2</td> <td>1</td> <td>Date - Day of the month. Use "d" to show the minimum number of digits, or "dd" to always show two digits (zero-padding if necessary, e.g. "08").</td> </tr> <tr> <td rowspan="4" style="text-align: center">E</td> <td style="text-align: center">1..3</td> <td>Tue</td> <td rowspan="4">Day of week - Use one through three letters for the short day, four for the full (wide) name, five for the narrow name, or six for the short name.</td> </tr> <tr> <td style="text-align: center">4</td> <td>Tuesday</td> </tr> <tr> <td style="text-align: center">5</td> <td>T</td> </tr> <tr> <td style="text-align: center">6</td> <td>Tu</td> </tr> <tr> <td style="text-align: center">a</td> <td style="text-align: center">1</td> <td>AM</td> <td>AM or PM</td> </tr> <tr> <td style="text-align: center">h</td> <td style="text-align: center">1..2</td> <td>11</td> <td>Hour [1-12]. When used in skeleton data or in a skeleton passed in an API for flexible data pattern generation, it should match the 12-hour-cycle format preferred by the locale (h or K); it should not match a 24-hour-cycle format (H or k). Use hh for zero padding.</td> </tr> <tr> <td style="text-align: center">H</td> <td style="text-align: center">1..2</td> <td>13</td> <td>Hour [0-23]. When used in skeleton data or in a skeleton passed in an API for flexible data pattern generation, it should match the 24-hour-cycle format preferred by the locale (H or k); it should not match a 12-hour-cycle format (h or K). Use HH for zero padding.</td> </tr> <tr> <td style="text-align: center">m</td> <td style="text-align: center">1..2</td> <td>59</td> <td>Minute. Use "m" to show the minimum number of digits, or "mm" to always show two digits (zero-padding if necessary, e.g. "08")..</td> </tr> <tr> <td style="text-align: center">s</td> <td style="text-align: center">1..2</td> <td>12</td> <td>Second. Use "s" to show the minimum number of digits, or "ss" to always show two digits (zero-padding if necessary, e.g. "08").</td> </tr> <tr> <td rowspan="2" style="text-align: center">z</td> <td style="text-align: center">1..3</td> <td>PDT</td> <td>Time zone. The short specific non-location format. Where that is unavailable, falls back to the short localized GMT format ("O").</td> </tr> <tr> <td style="text-align: center">4</td> <td>Pacific Daylight Time</td> <td>The long specific non-location format. Where that is unavailable, falls back to the long localized GMT format ("OOOO").</td> </tr> <tr> <td rowspan="2" style="text-align: center">v</td> <td style="text-align: center">1</td> <td>PT</td> <td>Time zone. The short generic non-location format. Where that is unavailable, falls back to the generic location format ("VVVV"), then the short localized GMT format as the final fallback.</td> </tr> <tr> <td style="text-align: center">4</td> <td>Pacific Time</td> <td>The long generic non-location format. Where that is unavailable, falls back to generic location format ("VVVV"). </tr> </table>

</blockquote>

Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '

Java documentation for android.icu.text.SimpleDateFormat.

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.

Constructors

SimpleDateFormat()

Constructs a SimpleDateFormat using the default pattern for the default FORMAT locale.

SimpleDateFormat(IntPtr, JniHandleOwnership)
SimpleDateFormat(String, DateFormatSymbols)

Constructs a SimpleDateFormat using the given pattern and locale-specific symbol data.

SimpleDateFormat(String, Locale)

Constructs a SimpleDateFormat using the given pattern and locale.

SimpleDateFormat(String, String, ULocale)

Constructs a SimpleDateFormat using the given pattern , override and locale.

SimpleDateFormat(String, ULocale)

Constructs a SimpleDateFormat using the given pattern and locale.

SimpleDateFormat(String)

Constructs a SimpleDateFormat using the given pattern in the default FORMAT locale.

Fields

AbbrGenericTz

<strong>[icu]</strong> Constant for generic non-location format, abbreviated if possible, such as PT; used in combinations date + time + zone, or time + zone.

(Inherited from DateFormat)
AbbrMonth

<strong>[icu]</strong> Constant for date skeleton with abbreviated month.

(Inherited from DateFormat)
AbbrMonthDay

<strong>[icu]</strong> Constant for date skeleton with abbreviated month and day.

(Inherited from DateFormat)
AbbrMonthWeekdayDay

<strong>[icu]</strong> Constant for date skeleton with abbreviated month, weekday, and day.

(Inherited from DateFormat)
AbbrQuarter

<strong>[icu]</strong> Constant for date skeleton with abbreviated quarter.

(Inherited from DateFormat)
AbbrSpecificTz

<strong>[icu]</strong> Constant for specific non-location format, abbreviated if possible, such as PDT; used in combinations date + time + zone, or time + zone.

(Inherited from DateFormat)
AbbrUtcTz

<strong>[icu]</strong> Constant for localized GMT/UTC format, such as GMT+8:00 or HPG-8:00; used in combinations date + time + zone, or time + zone.

(Inherited from DateFormat)
AbbrWeekday

<strong>[icu]</strong> Constant for date skeleton with abbreviated weekday.

(Inherited from DateFormat)
AmPmField
Obsolete.

FieldPosition selector for 'a' field alignment, corresponding to the Calendar#AM_PM field.

(Inherited from DateFormat)
AmPmMidnightNoonField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'b' field alignment.

(Inherited from DateFormat)
DateField
Obsolete.

FieldPosition selector for 'd' field alignment, corresponding to the Calendar#DATE field.

(Inherited from DateFormat)
Day

<strong>[icu]</strong> Constant for date skeleton with day.

(Inherited from DateFormat)
DayOfWeekField
Obsolete.

FieldPosition selector for 'E' field alignment, corresponding to the Calendar#DAY_OF_WEEK field.

(Inherited from DateFormat)
DayOfWeekInMonthField
Obsolete.

FieldPosition selector for 'F' field alignment, corresponding to the Calendar#DAY_OF_WEEK_IN_MONTH field.

(Inherited from DateFormat)
DayOfYearField
Obsolete.

FieldPosition selector for 'D' field alignment, corresponding to the Calendar#DAY_OF_YEAR field.

(Inherited from DateFormat)
Default
Obsolete.

Constant for default style pattern.

(Inherited from DateFormat)
DowLocalField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'e' field alignment, corresponding to the Calendar#DOW_LOCAL field.

(Inherited from DateFormat)
EraField
Obsolete.

FieldPosition selector for 'G' field alignment, corresponding to the Calendar#ERA field.

(Inherited from DateFormat)
ExtendedYearField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'u' field alignment, corresponding to the Calendar#EXTENDED_YEAR field.

(Inherited from DateFormat)
FlexibleDayPeriodField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'B' field alignment.

(Inherited from DateFormat)
FractionalSecondField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'S' field alignment, corresponding to the Calendar#MILLISECOND field.

(Inherited from DateFormat)
Full
Obsolete.

Constant for full style pattern.

(Inherited from DateFormat)
GenericTz

<strong>[icu]</strong> Constant for generic non-location format, such as Pacific Time; used in combinations date + time + zone, or time + zone.

(Inherited from DateFormat)
Hour

<strong>[icu]</strong> Constant for date skeleton with hour, with the locale's preferred hour format (12 or 24).

(Inherited from DateFormat)
Hour0Field
Obsolete.

FieldPosition selector for 'K' field alignment, corresponding to the Calendar#HOUR field.

(Inherited from DateFormat)
Hour1Field
Obsolete.

FieldPosition selector for 'h' field alignment, corresponding to the Calendar#HOUR field.

(Inherited from DateFormat)
Hour24

<strong>[icu]</strong> Constant for date skeleton with hour in 24-hour presentation.

(Inherited from DateFormat)
Hour24Minute

<strong>[icu]</strong> Constant for date skeleton with hour and minute in 24-hour presentation.

(Inherited from DateFormat)
Hour24MinuteSecond

<strong>[icu]</strong> Constant for date skeleton with hour, minute, and second in 24-hour presentation.

(Inherited from DateFormat)
HourMinute

<strong>[icu]</strong> Constant for date skeleton with hour and minute, with the locale's preferred hour format (12 or 24).

(Inherited from DateFormat)
HourMinuteSecond

<strong>[icu]</strong> Constant for date skeleton with hour, minute, and second, with the locale's preferred hour format (12 or 24).

(Inherited from DateFormat)
HourOfDay0Field
Obsolete.

FieldPosition selector for 'H' field alignment, corresponding to the Calendar#HOUR_OF_DAY field.

(Inherited from DateFormat)
HourOfDay1Field
Obsolete.

FieldPosition selector for 'k' field alignment, corresponding to the Calendar#HOUR_OF_DAY field.

(Inherited from DateFormat)
JulianDayField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'g' field alignment, corresponding to the Calendar#JULIAN_DAY field.

(Inherited from DateFormat)
LocationTz

<strong>[icu]</strong> Constant for generic location format, such as Los Angeles Time; used in combinations date + time + zone, or time + zone.

(Inherited from DateFormat)
Long
Obsolete.

Constant for long style pattern.

(Inherited from DateFormat)
Medium
Obsolete.

Constant for medium style pattern.

(Inherited from DateFormat)
MillisecondField
Obsolete.

Alias for FRACTIONAL_SECOND_FIELD.

(Inherited from DateFormat)
MillisecondsInDayField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'A' field alignment, corresponding to the Calendar#MILLISECONDS_IN_DAY field.

(Inherited from DateFormat)
Minute

<strong>[icu]</strong> Constant for date skeleton with minute.

(Inherited from DateFormat)
MinuteField
Obsolete.

FieldPosition selector for 'm' field alignment, corresponding to the Calendar#MINUTE field.

(Inherited from DateFormat)
MinuteSecond

<strong>[icu]</strong> Constant for date skeleton with minute and second.

(Inherited from DateFormat)
Month

<strong>[icu]</strong> Constant for date skeleton with month.

(Inherited from DateFormat)
MonthDay

<strong>[icu]</strong> Constant for date skeleton with long month and day.

(Inherited from DateFormat)
MonthField
Obsolete.

FieldPosition selector for 'M' field alignment, corresponding to the Calendar#MONTH field.

(Inherited from DateFormat)
MonthWeekdayDay

<strong>[icu]</strong> Constant for date skeleton with month, weekday, and day.

(Inherited from DateFormat)
None
Obsolete.

<strong>[icu]</strong> Constant for empty style pattern.

(Inherited from DateFormat)
NumMonth

<strong>[icu]</strong> Constant for date skeleton with numeric month.

(Inherited from DateFormat)
NumMonthDay

<strong>[icu]</strong> Constant for date skeleton with numeric month and day.

(Inherited from DateFormat)
NumMonthWeekdayDay

<strong>[icu]</strong> Constant for date skeleton with numeric month, weekday, and day.

(Inherited from DateFormat)
Quarter

<strong>[icu]</strong> Constant for date skeleton with quarter.

(Inherited from DateFormat)
QuarterField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'Q' field alignment, corresponding to the Calendar#MONTH field.

(Inherited from DateFormat)
Relative
Obsolete.

<strong>[icu]</strong> Constant for relative style mask.

(Inherited from DateFormat)
RelativeDefault
Obsolete.

<strong>[icu]</strong> Constant for relative default style pattern.

(Inherited from DateFormat)
RelativeFull
Obsolete.

<strong>[icu]</strong> Constant for relative full style pattern.

(Inherited from DateFormat)
RelativeLong
Obsolete.

<strong>[icu]</strong> Constant for relative style pattern.

(Inherited from DateFormat)
RelativeMedium
Obsolete.

<strong>[icu]</strong> Constant for relative style pattern.

(Inherited from DateFormat)
RelativeShort
Obsolete.

<strong>[icu]</strong> Constant for relative style pattern.

(Inherited from DateFormat)
Second

<strong>[icu]</strong> Constant for date skeleton with second.

(Inherited from DateFormat)
SecondField
Obsolete.

FieldPosition selector for 's' field alignment, corresponding to the Calendar#SECOND field.

(Inherited from DateFormat)
Short
Obsolete.

Constant for short style pattern.

(Inherited from DateFormat)
SpecificTz

<strong>[icu]</strong> Constant for specific non-location format, such as Pacific Daylight Time; used in combinations date + time + zone, or time + zone.

(Inherited from DateFormat)
StandaloneDayField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'c' field alignment, corresponding to the Calendar#DAY_OF_WEEK field.

(Inherited from DateFormat)
StandaloneMonthField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'L' field alignment, corresponding to the Calendar#MONTH field.

(Inherited from DateFormat)
StandaloneQuarterField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'q' field alignment, corresponding to the Calendar#MONTH field.

(Inherited from DateFormat)
TimezoneField
Obsolete.

FieldPosition selector for 'z' field alignment, corresponding to the Calendar#ZONE_OFFSET and Calendar#DST_OFFSET fields.

(Inherited from DateFormat)
TimezoneGenericField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'v' field alignment, corresponding to the Calendar#ZONE_OFFSET and Calendar#DST_OFFSET fields.

(Inherited from DateFormat)
TimezoneIsoField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'X' field alignment, corresponding to the Calendar#ZONE_OFFSET and Calendar#DST_OFFSET fields.

(Inherited from DateFormat)
TimezoneIsoLocalField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'x' field alignment, corresponding to the Calendar#ZONE_OFFSET and Calendar#DST_OFFSET fields.

(Inherited from DateFormat)
TimezoneLocalizedGmtOffsetField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'O' field alignment, corresponding to the Calendar#ZONE_OFFSET and Calendar#DST_OFFSET fields.

(Inherited from DateFormat)
TimezoneRfcField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'Z' field alignment, corresponding to the Calendar#ZONE_OFFSET and Calendar#DST_OFFSET fields.

(Inherited from DateFormat)
TimezoneSpecialField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'V' field alignment, corresponding to the Calendar#ZONE_OFFSET and Calendar#DST_OFFSET fields.

(Inherited from DateFormat)
Weekday

<strong>[icu]</strong> Constant for date skeleton with weekday.

(Inherited from DateFormat)
WeekOfMonthField
Obsolete.

FieldPosition selector for 'W' field alignment, corresponding to the Calendar#WEEK_OF_MONTH field.

(Inherited from DateFormat)
WeekOfYearField
Obsolete.

FieldPosition selector for 'w' field alignment, corresponding to the Calendar#WEEK_OF_YEAR field.

(Inherited from DateFormat)
Year

<strong>[icu]</strong> Constant for date skeleton with year.

(Inherited from DateFormat)
YearAbbrMonth

<strong>[icu]</strong> Constant for date skeleton with year and abbreviated month.

(Inherited from DateFormat)
YearAbbrMonthDay

<strong>[icu]</strong> Constant for date skeleton with year, abbreviated month, and day.

(Inherited from DateFormat)
YearAbbrMonthWeekdayDay

<strong>[icu]</strong> Constant for date skeleton with year, abbreviated month, weekday, and day.

(Inherited from DateFormat)
YearAbbrQuarter

<strong>[icu]</strong> Constant for date skeleton with year and abbreviated quarter.

(Inherited from DateFormat)
YearField
Obsolete.

FieldPosition selector for 'y' field alignment, corresponding to the Calendar#YEAR field.

(Inherited from DateFormat)
YearMonth

<strong>[icu]</strong> Constant for date skeleton with year and month.

(Inherited from DateFormat)
YearMonthDay

<strong>[icu]</strong> Constant for date skeleton with year, month, and day.

(Inherited from DateFormat)
YearMonthWeekdayDay

<strong>[icu]</strong> Constant for date skeleton with year, month, weekday, and day.

(Inherited from DateFormat)
YearNameField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'U' field alignment, corresponding to the Calendar#YEAR field.

(Inherited from DateFormat)
YearNumMonth

<strong>[icu]</strong> Constant for date skeleton with year and numeric month.

(Inherited from DateFormat)
YearNumMonthDay

<strong>[icu]</strong> Constant for date skeleton with year, numeric month, and day.

(Inherited from DateFormat)
YearNumMonthWeekdayDay

<strong>[icu]</strong> Constant for date skeleton with year, numeric month, weekday, and day.

(Inherited from DateFormat)
YearQuarter

<strong>[icu]</strong> Constant for date skeleton with year and quarter.

(Inherited from DateFormat)
YearWoyField
Obsolete.

<strong>[icu]</strong> FieldPosition selector for 'Y' field alignment, corresponding to the Calendar#YEAR_WOY field.

(Inherited from DateFormat)

Properties

Calendar

Returns the calendar associated with this date/time formatter. -or- Sets the calendar to be used by this date format.

(Inherited from DateFormat)
CalendarLenient

Returns whether date/time parsing in the encapsulated Calendar object is lenient. -or- Specifies whether date/time parsing in the encapsulated Calendar object should be lenient.

(Inherited from DateFormat)
Class

Returns the runtime class of this Object.

(Inherited from Object)
DateFormatSymbols

Gets the date/time formatting data. -or- Allows you to set the date/time formatting data.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Lenient

Returns whether both date/time parsing in the encapsulated Calendar object and DateFormat whitespace &amp; numeric processing is lenient. -or- Specifies whether date/time parsing is to be lenient.

(Inherited from DateFormat)
NumberFormat

Returns the number formatter which this date/time formatter uses to format and parse a time. -or- Sets the number formatter.

(Inherited from DateFormat)
PeerReference (Inherited from Object)
Symbols

Method for subclasses to access the DateFormatSymbols.

ThresholdClass
ThresholdType
TimeZone

Returns the time zone. -or- Sets the time zone for the calendar of this DateFormat object.

(Inherited from DateFormat)
TimeZoneFormat

<strong>[icu]</strong> Gets the time zone formatter which this date/time formatter uses to format and parse a time zone. -or- <strong>[icu]</strong> Allows you to set the time zone formatter.

Methods

ApplyLocalizedPattern(String)

Apply the given localized pattern string to this date format.

ApplyPattern(String)

Apply the given unlocalized pattern string to this date format.

Clone()

Creates and returns a copy of this object.

(Inherited from _Format)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
Format(Calendar, StringBuffer, FieldPosition)

Formats a date or time, which is the standard millis since January 1, 1970, 00:00:00 GMT.

Format(Date, StringBuffer, FieldPosition)

Formats a Date into a date/time string.

(Inherited from DateFormat)
Format(Date)

Formats a Date into a date/time string.

(Inherited from DateFormat)
Format(Object, StringBuffer, FieldPosition)

Formats a time object into a time string.

(Inherited from DateFormat)
Format(Object)

Formats an object to produce a string.

(Inherited from _Format)
FormatToCharacterIterator(Object)

Formats an Object producing an AttributedCharacterIterator.

(Inherited from _Format)
Get2DigitYearStart()

Returns the beginning date of the 100-year period 2-digit years are interpreted as being within.

GetBooleanAttribute(DateFormat+BooleanAttribute) (Inherited from DateFormat)
GetContext(DisplayContext+Type) (Inherited from DateFormat)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetNumberFormat(Char)

give the NumberFormat used for the field like 'y'(year) and 'M'(year)

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
MatchQuarterString(String, Int32, Int32, String[], Calendar)

Attempt to match the text at a given position against an array of quarter strings.

MatchString(String, Int32, Int32, String[], Calendar)

Attempt to match the text at a given position against an array of strings.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
Parse(String, Calendar, ParsePosition)

Overrides DateFormat

Parse(String, ParsePosition)

Parses a date/time string according to the given parse position.

(Inherited from DateFormat)
Parse(String)

Parses a date/time string.

(Inherited from DateFormat)
ParseObject(String, ParsePosition)

Parses a date/time string into an Object.

(Inherited from DateFormat)
ParseObject(String)

Parses text from the beginning of the given string to produce an object.

(Inherited from _Format)
PatternCharToDateFormatField(Char)
Set2DigitYearStart(Date)

Sets the 100-year period 2-digit years will be interpreted as being in to begin on the date the user specifies.

SetBooleanAttribute(DateFormat+BooleanAttribute, Boolean) (Inherited from DateFormat)
SetContext(DisplayContext)

<strong>[icu]</strong> Set a particular DisplayContext value in the formatter, such as CAPITALIZATION_FOR_STANDALONE.

(Inherited from DateFormat)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetNumberFormat(String, NumberFormat)

allow the user to set the NumberFormat for several fields It can be a single field like: "y"(year) or "M"(month) It can be several field combined together: "yMd"(year, month and date) Note: 1 symbol field is enough for multiple symbol fields (so "y" will override "yy", "yyy") If the field is not numeric, then override has no effect (like "MMM" will use abbreviation, not numerical field)

SubFormat(Char, Int32, Int32, FieldPosition, DateFormatSymbols, Calendar)

Formats a single field, given its pattern character.

SubParse(String, Int32, Char, Int32, Boolean, Boolean, Boolean[], Calendar)

Protected method that converts one field of the input string into a numeric field value in cal.

ToArray<T>() (Inherited from Object)
ToLocalizedPattern()

Return a localized pattern string describing this date format.

ToPattern()

Return a pattern string describing this date format.

ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
ZeroPaddingNumber(Int64, Int32, Int32)

Formats a number with the specified minimum and maximum number of digits.

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to