myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Heinen" <>
Subject RE: Date output depending on the userlocale?
Date Thu, 30 Oct 2008 12:33:53 GMT
Yes, you can simply specify the various date formats in resource bundles
and use the pattern in converters:

<h:outputText id="aDate" value="#{MyBean.mydate}">
   <x:convertDateTime pattern="#{msgs['dateFormat]}"/>

dateFormat = DD/MM/YYYY
dateFormat = DD-MM-YYYY


-----Original Message-----
From: [] 
Sent: Donnerstag, 30. Oktober 2008 12:44
Subject: Date output depending on the userlocale?

Hi *,

is it possible to configure the date format which is used for the output
of Date-objects for every locale - for example in the locale resource
bundle or in the faces-config.xml?


Locale en_US DD/MM/YYYY
Locale de_DE DD-MM-YYYY
Locale en_EN DD-MM.YYYY 

Thanks and best regards,

Felix Becker

View raw message