|
Download
FAQ History |
|
API
Search Feedback |
Date and Number Formatting
Java programs use the
DateFormat.getDateInstance(int,locale)to parse and format dates in a locale-sensitive manner. Java programs use theNumberFormat.getXXXInstance(locale)method, whereXXXcan beCurrency,Number, orPercent, to parse and format numerical values in a locale-sensitive manner. The servlet version of Duke's Bookstore uses the currency version of this method to format book prices.JSTL applications use the
fmt:formatDateandfmt:parseDatetags to handle localized dates, andfmt:formatNumberandfmt:parseNumbertags to handle localized numbers, including currency values. For more information on the JSTL formatting tags, see Formatting Tags. The JSTL version of Duke's bookstore uses thefmt:formatNumbertag to format book prices and thefmt:formatDatetag to format delivery dates.
|
Download
FAQ History |
|
API
Search Feedback |
All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.