With facelets, what's the equivalent of fmt: formatDate?
2 answers
Usually in JSF you add to the control ( convertDateTime ):
<h:outputText value="#{dateConverterBean.now}">
<f:convertDateTime type="date" dateStyle="short" />
</h:outputText>
The documentation for Facelets assumes they use the same thing.
+3
source to share
The f: convertDateTime converter uses GMT / UMT as timezone for date / time formatting. This is quite annoying and can lead to incorrect local date and time. You can specify the timezone for the converter using a bean. I would suggest creating your own converter. Executes only a few lines of code and provides more accurate formatting.
+1
source to share