DateTimePatternGenerator 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.
This class provides flexible generation of date format patterns, like "yy-MM-dd".
[Android.Runtime.Register("android/icu/text/DateTimePatternGenerator", ApiSince=24, DoNotGenerateAcw=true)]
public class DateTimePatternGenerator : Java.Lang.Object, Android.Icu.Util.IFreezable, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/icu/text/DateTimePatternGenerator", ApiSince=24, DoNotGenerateAcw=true)>]
type DateTimePatternGenerator = class
inherit Object
interface IFreezable
interface ICloneable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- Inheritance
- Attributes
- Implements
Remarks
This class provides flexible generation of date format patterns, like "yy-MM-dd". The user can build up the generator by adding successive patterns. Once that is done, a query can be made using a "skeleton", which is a pattern which just includes the desired fields and lengths. The generator will return the "best fit" pattern corresponding to that skeleton.
The main method people will use is getBestPattern(String skeleton), since normally this class is pre-built with data from a particular locale. However, generators can be built directly from other data as well.
Java documentation for android.icu.text.DateTimePatternGenerator
.
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
DateTimePatternGenerator() |
Only for use by subclasses |
DateTimePatternGenerator(IntPtr, JniHandleOwnership) |
Fields
Day | |
DayOfWeekInMonth | |
DayOfYear | |
Dayperiod | |
Era | |
FractionalSecond | |
Hour | |
MatchAllFieldsLength |
Obsolete.
Option mask for forcing the width of all date and time fields. |
MatchHourFieldLength |
Obsolete.
Option mask for forcing the width of hour field. |
MatchNoOptions |
Obsolete.
Default option mask used for |
Minute | |
Month | |
Quarter | |
Second | |
Weekday | |
WeekOfMonth | |
WeekOfYear | |
Year | |
Zone |
Properties
Class |
Returns the runtime class of this |
DateTimeFormat |
Getter corresponding to setDateTimeFormat. -or- The date time format is a message format pattern used to compose date and time patterns. |
Decimal |
Getter corresponding to setDecimal. -or- The decimal value is used in formatting fractions of seconds. |
DefaultHourCycle | |
EmptyInstance |
Create empty generator, to be constructed with addPattern(. |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
Instance |
Construct a flexible generator according to data for the default |
IsFrozen |
To be added |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
ThresholdClass | |
ThresholdType |
Methods
AddPattern(String, Boolean, DateTimePatternGenerator+PatternInfo) | |
Clone() |
Returns a copy of this |
CloneAsThawed() |
To be added |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
Freeze() |
To be added |
GetAppendItemFormat(DateTimePatternField) |
Getter corresponding to setAppendItemFormats. |
GetAppendItemName(DateTimePatternField) |
Getter corresponding to setAppendItemName. |
GetBaseSkeleton(String) |
Utility to return a unique base skeleton from a given pattern. |
GetBaseSkeletons(ICollection<String>) |
Return a list of all the base skeletons (in canonical form) from this class |
GetBestPattern(String, DateTimePatternMatchOptions) |
Return the best pattern matching the input skeleton. |
GetBestPattern(String) |
Return the best pattern matching the input skeleton. |
GetDateTimeFormat(Int32) |
Getter corresponding to setDateTimeFormat. |
GetFieldDisplayName(Int32, DateTimePatternGenerator+DisplayWidth) | |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetInstance(Locale) |
Construct a flexible generator according to data for a given locale. |
GetInstance(ULocale) |
Construct a flexible generator according to data for a given locale. |
GetSkeleton(String) |
Utility to return a unique skeleton from a given pattern. |
GetSkeletons(IDictionary<String,String>) |
Return a list of all the skeletons (in canonical form) from this class, and the patterns that they map to. |
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) |
ReplaceFieldTypes(String, String, DateTimePatternMatchOptions) |
Adjusts the field types (width and subtype) of a pattern to match what is in a skeleton. |
ReplaceFieldTypes(String, String) |
Adjusts the field types (width and subtype) of a pattern to match what is in a skeleton. |
SetAppendItemFormat(DateTimePatternField, String) |
An AppendItem format is a pattern used to append a field if there is no good match. |
SetAppendItemName(DateTimePatternField, String) |
Sets the names of fields, eg "era" in English for ERA. |
SetDateTimeFormat(Int32, String) |
dateTimeFormats are message patterns used to compose combinations of date and time patterns. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
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
IFreezable.CloneAsThawed() | |
IFreezable.Freeze() | |
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 |