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

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

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

Public properties

Int
Int

Public companion functions

createDateInstance

Added in 1.0.0-alpha01
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 androidx.core.i18n.DateTimeFormatter.

createDateTimeInstance

Added in 1.0.0-alpha01
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 androidx.core.i18n.DateTimeFormatter.

createTimeInstance

Added in 1.0.0-alpha01
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 androidx.core.i18n.DateTimeFormatter.

Public properties

dateStyle

Added in 1.0.0-alpha01
val dateStyleInt

timeStyle

Added in 1.0.0-alpha01
val timeStyleInt