Android Studio Sign in

DateTimeFormatterJdkStyleOptions


public final class DateTimeFormatterJdkStyleOptions


This class provides functionality similar to the one in java.text.DateFormat.

Although not very flexible, it makes migration easier.

Summary

Public methods

static final @NonNull DateTimeFormatterJdkStyleOptions
createDateInstance(int style)

Gets the date formatter with the given formatting style for the default locale.

static final @NonNull DateTimeFormatterJdkStyleOptions
createDateTimeInstance(int dateStyle, int timeStyle)

Gets the date / time formatter with the given formatting styles for the default locale.

static final @NonNull DateTimeFormatterJdkStyleOptions
createTimeInstance(int style)

Gets the time formatter with the given formatting style for the default locale.

final int
final int

Public methods

createDateInstance

Added in 1.0.0
public static final @NonNull DateTimeFormatterJdkStyleOptions createDateInstance(int style)

Gets the date formatter with the given formatting style for the default locale.

Parameters
int style

the given date formatting style. For example, SHORT for "M/d/yy" in the US locale.

createDateTimeInstance

Added in 1.0.0
public static final @NonNull DateTimeFormatterJdkStyleOptions createDateTimeInstance(int dateStyle, int timeStyle)

Gets the date / time formatter with the given formatting styles for the default locale.

Parameters
int dateStyle

the given date formatting style. For example, SHORT for "M/d/yy" in the US locale.

int timeStyle

the given time formatting style. For example, SHORT for "h:mm a" in the US locale.

createTimeInstance

Added in 1.0.0
public static final @NonNull DateTimeFormatterJdkStyleOptions createTimeInstance(int style)

Gets the time formatter with the given formatting style for the default locale.

Parameters
int style

the given time formatting style. For example, SHORT for "h:mm a" in the US locale.

getDateStyle

Added in 1.0.0
public final int getDateStyle()

getTimeStyle

Added in 1.0.0
public final int getTimeStyle()
Morty Proxy This is a proxified and sanitized view of the page, visit original site.