DateFormatSymbols Class
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.
<strong>[icu enhancement]</strong> ICU's replacement for java.text.DateFormatSymbols
.
[Android.Runtime.Register("android/icu/text/DateFormatSymbols", ApiSince=24, DoNotGenerateAcw=true)]
public class DateFormatSymbols : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable, Java.Lang.ICloneable
[<Android.Runtime.Register("android/icu/text/DateFormatSymbols", ApiSince=24, DoNotGenerateAcw=true)>]
type DateFormatSymbols = class
inherit Object
interface ISerializable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
interface ICloneable
- Inheritance
- Attributes
- Implements
Remarks
<strong>[icu enhancement]</strong> ICU's replacement for java.text.DateFormatSymbols
. Methods, fields, and other functionality specific to ICU are labeled '<strong>[icu]</strong>'.
DateFormatSymbols
is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data. DateFormat
and SimpleDateFormat
both use DateFormatSymbols
to encapsulate this information.
Typically you shouldn't use DateFormatSymbols
directly. Rather, you are encouraged to create a date-time formatter with the DateFormat
class's factory methods: getTimeInstance
, getDateInstance
, or getDateTimeInstance
. These methods automatically create a DateFormatSymbols
for the formatter so that you don't have to. After the formatter is created, you may modify its format pattern using the setPattern
method. For more information about creating formatters using DateFormat
's factory methods, see DateFormat
.
If you decide to create a date-time formatter with a specific format pattern for a specific locale, you can do so with: <blockquote>
new SimpleDateFormat(aPattern, new DateFormatSymbols(aLocale)).
</blockquote>
DateFormatSymbols
objects are clonable. When you obtain a DateFormatSymbols
object, feel free to modify the date-time formatting data. For instance, you can replace the localized date-time format pattern characters with the ones that you feel easy to remember. Or you can change the representative cities to your favorite ones.
New DateFormatSymbols
subclasses may be added to support SimpleDateFormat
for date-time formatting for additional locales.
Java documentation for android.icu.text.DateFormatSymbols
.
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
DateFormatSymbols() |
Constructs a DateFormatSymbols object by loading format data from
resources for the default |
DateFormatSymbols(Calendar, Locale) |
Returns the |
DateFormatSymbols(Calendar, ULocale) |
Returns the |
DateFormatSymbols(Class, Locale) |
Variant of DateFormatSymbols(Calendar, Locale) that takes the Calendar class instead of a Calendar instance. |
DateFormatSymbols(Class, ULocale) |
Variant of DateFormatSymbols(Calendar, ULocale) that takes the Calendar class instead of a Calendar instance. |
DateFormatSymbols(IntPtr, JniHandleOwnership) | |
DateFormatSymbols(Locale) |
Constructs a DateFormatSymbols object by loading format data from resources for the given locale. |
DateFormatSymbols(ResourceBundle, Locale) |
Fetches a custom calendar's DateFormatSymbols out of the given resource bundle. |
DateFormatSymbols(ResourceBundle, ULocale) |
Fetches a custom calendar's DateFormatSymbols out of the given resource bundle. |
DateFormatSymbols(ULocale) |
<strong>[icu]</strong> Constructs a DateFormatSymbols object by loading format data from resources for the given ulocale. |
Fields
Abbreviated |
Obsolete.
<strong>[icu]</strong> Constant for width. |
Format |
Obsolete.
<strong>[icu]</strong> Constant for context. |
Narrow |
Obsolete.
<strong>[icu]</strong> Constant for width. |
Short |
Obsolete.
<strong>[icu]</strong> Constant for width; only supported for weekdays. |
Standalone |
Obsolete.
<strong>[icu]</strong> Constant for context. |
Wide |
Obsolete.
<strong>[icu]</strong> Constant for width. |
Properties
Class |
Returns the runtime class of this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
Instance |
Returns a DateFormatSymbols instance for the default locale. |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
LocalPatternChars |
Returns localized date-time pattern characters. -or- Sets localized date-time pattern characters. |
PeerReference | (Inherited from Object) |
ThresholdClass | |
ThresholdType |
Methods
Clone() |
Overrides clone. |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GetAmPmStrings() |
Returns am/pm strings. |
GetAvailableLocales() |
Returns an array of all locales for which the |
GetEraNames() |
<strong>[icu]</strong> Returns full era name strings. |
GetEras() |
Returns abbreviated era strings. |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetInstance(Locale) |
Returns a DateFormatSymbols instance for the given locale. |
GetInstance(ULocale) |
<strong>[icu]</strong> Returns a DateFormatSymbols instance for the given locale. |
GetMonths() |
Returns month strings. |
GetMonths(Int32, Int32) |
Returns month strings. |
GetNarrowEras() |
<strong>[icu]</strong> Returns narrow era name strings. |
GetQuarters(Int32, Int32) |
<strong>[icu]</strong> Returns quarter strings. |
GetShortMonths() |
Returns short month strings. |
GetShortWeekdays() |
Returns abbreviated weekday strings; for example: "Sun", "Mon", etc. |
GetWeekdays() |
Returns wide weekday strings. |
GetWeekdays(Int32, Int32) |
Returns weekday strings. |
GetYearNames(Int32, Int32) |
Returns cyclic year name strings if the calendar has them, for example: "jia-zi", "yi-chou", etc. |
GetZodiacNames(Int32, Int32) |
Returns calendar zodiac name strings if the calendar has them, for example: "Rat", "Ox", "Tiger", etc. |
GetZoneStrings() |
Returns time zone strings. |
InitializeData(ULocale, String) |
Initializes format symbols for the locale and calendar type |
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) |
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) |
SetAmPmStrings(String[]) |
Sets am/pm strings. |
SetEraNames(String[]) |
<strong>[icu]</strong> Sets full era name strings. |
SetEras(String[]) |
Sets abbreviated era strings. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
SetMonths(String[], Int32, Int32) |
Sets month strings. |
SetMonths(String[]) |
Sets month strings. |
SetNarrowEras(String[]) |
<strong>[icu]</strong> Sets narrow era name strings. |
SetQuarters(String[], Int32, Int32) |
<strong>[icu]</strong> Sets quarter strings. |
SetShortMonths(String[]) |
Sets short month strings. |
SetShortWeekdays(String[]) |
Sets abbreviated weekday strings; for example: "Sun", "Mon", etc. |
SetWeekdays(String[], Int32, Int32) |
Sets weekday strings. |
SetWeekdays(String[]) |
Sets wide weekday strings. |
SetYearNames(String[], Int32, Int32) |
Sets cyclic year name strings, for example: "jia-zi", "yi-chou", etc. |
SetZodiacNames(String[], Int32, Int32) |
Sets calendar zodiac name strings, for example: "Rat", "Ox", "Tiger", etc. |
SetZoneStrings(String[][]) |
Sets time zone strings. |
ToArray<T>() | (Inherited from Object) |
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) |
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 |
JavaAs<TResult>(IJavaPeerable) |
Try to coerce |
TryJavaCast<TResult>(IJavaPeerable, TResult) |
Try to coerce |