Scott Cameron
Scott Cameron

Reputation: 5323

Decomposing Dojo format/parse patterns

I'm using the Dojo Toolkit number/parse functions to deal with formatting and parsing strings using the ICU pattern syntax pretty heavily.

Does anybody know it is possible to take an arbitrary ICU pattern string and somehow use the Dojo (or other) library to decompose it into it's parts (e.g. for number pattern it could be decomposed into number of decimals, thousands grouping, etc...).

I'm hoping to do this without needing to have my code understand the ICU pattern syntax intimately.

It doesn't look like this is available via standard Dojo APIs but maybe somebody knows of any support for this elsewhere?

Upvotes: 4

Views: 323

Answers (1)

peller
peller

Reputation: 4543

the way the Dojo routines are implemented, the pattern parsing and the formatting are intertwined and the properties are not exposed, unfortunately.

Upvotes: 3

Related Questions