In a localized application, this separation will be decided by translators when they translate your resource packages:
dateRange={0,date}-{1,date}
Can be:
dateRange={0,date} to {1,date}
This can then be handled using MessageFormat . Something like form:
MessageFormat mf = new MessageFormat(formatString, locale);
Object[] range = {date1, date2};
String result = mf.format(range);
Even if you do not provide a full translation, this approach may be applicable for certain localizations.
source
share