Chapter 8. Formatting Actions
Topics in This Chapter
Formatting and Parsing Numbers
Formatting and Parsing Dates and Times
Using Time Zones
Determining a Formatting Locale
If you want your website to be accessible to as many people as possible, it's crucial to localize text, as discussed in “I18N Actions” on page 248. But it's just as important to localize numbers, dates, and currencies; for example, if you publicized an event on your website and you specified the date as 06/12/2004, Americans would arrive on June 12th, whereas most Europeans would arrive on December 6th. Fortunately, JSTL provides six actions that you can use to format and parse numbers, currencies, percents, and dates:
<fmt:formatNumber>
<fmt:parseNumber>
<fmt:formatDate>
<fmt:parseDate> ...
Get Core JSTL: Mastering the JSP™ Standard Tag Library now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.