Skip to content

wordBased() with abbreviated output #386

Description

@msqr

I really like the AmountFormats.wordBased() methods for generating localized time period descriptions, but would really like to be able to generate output with abbreviations, sort of like if the methods could accept a java.time.format.FormatStyle.SHORT style argument, for example:

public static String wordBased(Period period, Duration duration, Locale locale, FormatStyle style) {
    // impl here
}

For example instead of output like:

25 days, 7 hours and 5 minutes

I'm after output more like this:

25 days, 7 hr, 5 min

The time4j project supports this concept (see English i18n example) but I was hoping to avoid including another library in my project that is already using threeten-extra.

Would there be any interest in incorporating this concept into the project?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions