Stay organized with collections
Save and categorize content based on your preferences.
class FormatStyle
Enumeration of the style of a localized date, time or date-time formatter.
These styles are used when obtaining a date-time style from configuration. See DateTimeFormatter
and DateTimeFormatterBuilder
for usage.
Summary
Enum values |
Full text style, with the most detail.
|
Long text style, with lots of detail.
|
Medium text style, with some detail.
|
Short text style, typically numeric.
|
Enum values
FULL
enum val FULL : FormatStyle
Full text style, with the most detail. For example, the format might be 'Tuesday, April 12, 1952 AD' or '3:30:42pm PST'.
LONG
enum val LONG : FormatStyle
Long text style, with lots of detail. For example, the format might be 'January 12, 1952'.
MEDIUM
enum val MEDIUM : FormatStyle
Medium text style, with some detail. For example, the format might be 'Jan 12, 1952'.
SHORT
enum val SHORT : FormatStyle
Short text style, typically numeric. For example, the format might be '12.13.52' or '3:30pm'.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# FormatStyle\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nFormatStyle\n===========\n\n```\nclass FormatStyle\n```\n\n|---|---|-----------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\\\u003c[java.time.format.FormatStyle](#)\\\u003e ||\n| | ↳ | [java.time.format.FormatStyle](#) |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [FormatStyle.FULL](#ENUM_VALUE:FULL), [FormatStyle.LONG](#ENUM_VALUE:LONG), [FormatStyle.MEDIUM](#ENUM_VALUE:MEDIUM), [FormatStyle.SHORT](#ENUM_VALUE:SHORT) |------------------------------------------|----------------------------------------| | [FormatStyle.FULL](#ENUM_VALUE:FULL) | Full text style, with the most detail. | | [FormatStyle.LONG](#ENUM_VALUE:LONG) | Long text style, with lots of detail. | | [FormatStyle.MEDIUM](#ENUM_VALUE:MEDIUM) | Medium text style, with some detail. | | [FormatStyle.SHORT](#ENUM_VALUE:SHORT) | Short text style, typically numeric. | |\n\nEnumeration of the style of a localized date, time or date-time formatter.\n\nThese styles are used when obtaining a date-time style from configuration. See [DateTimeFormatter](/reference/kotlin/java/time/format/DateTimeFormatter) and [DateTimeFormatterBuilder](/reference/kotlin/java/time/format/DateTimeFormatterBuilder) for usage.\n\nSummary\n-------\n\n| Enum values ||\n|-------------------------------------------------------------------|---|\n| [FULL](#ENUM_VALUE:FULL) Full text style, with the most detail. |\n| [LONG](#ENUM_VALUE:LONG) Long text style, with lots of detail. |\n| [MEDIUM](#ENUM_VALUE:MEDIUM) Medium text style, with some detail. |\n| [SHORT](#ENUM_VALUE:SHORT) Short text style, typically numeric. |\n\nEnum values\n-----------\n\n### FULL\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val FULL : FormatStyle\n```\n\nFull text style, with the most detail. For example, the format might be 'Tuesday, April 12, 1952 AD' or '3:30:42pm PST'. \n\n### LONG\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val LONG : FormatStyle\n```\n\nLong text style, with lots of detail. For example, the format might be 'January 12, 1952'. \n\n### MEDIUM\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val MEDIUM : FormatStyle\n```\n\nMedium text style, with some detail. For example, the format might be 'Jan 12, 1952'. \n\n### SHORT\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val SHORT : FormatStyle\n```\n\nShort text style, typically numeric. For example, the format might be '12.13.52' or '3:30pm'."]]