Interface IPresetTemporalFormatter

  • All Known Implementing Classes:
    DefaultPresetTemporalFormatter

    public interface IPresetTemporalFormatter
    Abstraction for formatting temporal objects (like dates and times) into localized strings. Allows only for a named preset of styles, does not allow for custom formatting patterns. Intended for scenarios where consistent formatting is required.

    Unlike DateTimeFormatter, this is an interface that does allow custom implementations.

    Since:
    8.4.0
    • Method Detail

      • forStyle

        IPresetTemporalFormatterBuilder forStyle​(EPresetTemporalFormatStyle style)
        Gets a builder for formatting a temporal object into a localized string. Allows configuring various options. The returned builder is not thread-safe and should be used in a single thread only.
        Parameters:
        style - The style to use for formatting, never null.
        Returns:
        A builder for formatting a temporal object into a localized string, never null.