formatjs / handlebars-intl

Handlebars helpers for internationalization.
http://formatjs.io/handlebars/
Other
265 stars 28 forks source link

Dates interval with format long: do non repeat year #80

Open caneta opened 8 years ago

caneta commented 8 years ago

I have 2 dates in order to create the following message:

{From {startDate, date, long} to {endDate, date, long}}

That's nice, but is that possible to avoid the year repetition if it is the same for startDate and endDate? For example now I get From May 19, 2016 to May 23, 2016 and I would like to have From May 19 to May 23, 2016. If this is possible, how to get it? Thank you.