DateTimeFormatterJdkStyleOptions
class DateTimeFormatterJdkStyleOptions
This class provides functionality similar to the one in java.text.DateFormat
.
Although not very flexible, it makes migration easier.
Summary
Public companion functions |
|
---|---|
DateTimeFormatterJdkStyleOptions |
createDateInstance(style: Int) Gets the date formatter with the given formatting style for the default locale. |
DateTimeFormatterJdkStyleOptions |
createDateTimeInstance(dateStyle: Int, timeStyle: Int) Gets the date / time formatter with the given formatting styles for the default locale. |
DateTimeFormatterJdkStyleOptions |
createTimeInstance(style: Int) Gets the time formatter with the given formatting style for the default locale. |
Public companion functions
createDateInstance
fun createDateInstance(style: Int): DateTimeFormatterJdkStyleOptions
Gets the date formatter with the given formatting style for the default locale.
Parameters | |
---|---|
style: Int |
the given date formatting style. For example, SHORT for "M/d/yy" in the US locale. |
Returns | |
---|---|
DateTimeFormatterJdkStyleOptions |
the formatting options to use with |
createDateTimeInstance
fun createDateTimeInstance(dateStyle: Int, timeStyle: Int): DateTimeFormatterJdkStyleOptions
Gets the date / time formatter with the given formatting styles for the default locale.
Parameters | |
---|---|
dateStyle: Int |
the given date formatting style. For example, SHORT for "M/d/yy" in the US locale. |
timeStyle: Int |
the given time formatting style. For example, SHORT for "h:mm a" in the US locale. |
Returns | |
---|---|
DateTimeFormatterJdkStyleOptions |
the formatting options to use with |
createTimeInstance
fun createTimeInstance(style: Int): DateTimeFormatterJdkStyleOptions
Gets the time formatter with the given formatting style for the default locale.
Parameters | |
---|---|
style: Int |
the given time formatting style. For example, SHORT for "h:mm a" in the US locale. |
Returns | |
---|---|
DateTimeFormatterJdkStyleOptions |
the formatting options to use with |