Have syntax for MessageFormat with date/time skeletons

Description

To use a message format with a skeleton you have to use some ugly code.

1 2 3 4 5 6 MessageFormat m = new MessageFormat("... {1,date} ...",uLocale); DateTimePatternGenerator dtpg = DateTimePatternGenerator.getInstance(uLocale); String pattern2 = dtpg.getBestPattern("jmm"); // need these 2 steps to get from skeleton to pattern m.setFormat(1, DateFormat.getPatternInstance(pattern2, uLocale)); m.format(...,now,...)

Would be much easier for callers if we added an option to:

1 argType = "number" | "date" | "time" | "spellout" | "ordinal" | "duration"

Something like either "skeleton", or "datetime".

Status

Assignee

Mihai Nita

Reporter

Mark Davis

Labels

None

Reviewer

None

Time Needed

Days

Start date

None

Components

Fix versions

Priority

major