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
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. |
| Returns | |
|---|---|
@NonNull DateTimeFormatterJdkStyleOptions |
the formatting options to use with |
createDateTimeInstance
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. |
| Returns | |
|---|---|
@NonNull DateTimeFormatterJdkStyleOptions |
the formatting options to use with |
createTimeInstance
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. |
| Returns | |
|---|---|
@NonNull DateTimeFormatterJdkStyleOptions |
the formatting options to use with |