Interface TemporalStyle

All Known Subinterfaces:
TemporalStyle.DateTime, TemporalStyle.None

public sealed interface TemporalStyle permits TemporalStyle.DateTime, TemporalStyle.None
Represents the style of a temporal component.
  • Method Details

    • ofDate

      static TemporalStyle.DateTime ofDate(FormatStyle style)
      Creates a new datetime temporal style with the specified date style.
      Parameters:
      style - the date style
      Returns:
      the datetime temporal style
    • ofTime

      static TemporalStyle.DateTime ofTime(FormatStyle style)
      Creates a new datetime temporal style with the specified time style.
      Parameters:
      style - the time style
      Returns:
      the datetime temporal style
    • ofDateTime

      static TemporalStyle.DateTime ofDateTime(FormatStyle dateStyle, FormatStyle timeStyle)
      Creates a new datetime temporal style with the specified date and time styles.
      Parameters:
      dateStyle - the date style
      timeStyle - the time style
      Returns:
      the datetime temporal style
    • ofDateTime

      static TemporalStyle.DateTime ofDateTime(FormatStyle style)
      Creates a new datetime temporal style with the specified date and time styles.
      Parameters:
      style - the date and time style
      Returns:
      the datetime temporal style
    • none

      static TemporalStyle.None none()
      Returns a temporal style that does not format the temporal component.