Let's say I have a period of days:
Period p = Period.ofDays(3);
And I want to format the period with the "days" label in the string to get this string as output:
// "3 days"
...but, I want to localize the "days" component, so I can't use a formatted string like the following, otherwise it will only ever appear correctly in English:
String.format("%d days", numberOfDays); // Won't localize 'days'
What APIs are there in Java/Kotlin/Android to represent a period of time, like hours, days, weeks, years in a locale? I would rather not localize those words by myself if I can let the API do it.