The java.text Package

The most advanced and complex Internationalization API features are found in the java.text package. They include many classes for formatting and organizing text in a language-independent way. You have already seen some of the classes and features in the previous sections of this chapter. To refresh your memory, date formatting can be problematic for programmers. In America, dates are written in month-day-year order, but in Europe, dates are written in day-month-year order. This makes interpreting a date like 10/2/97 difficult: Does this represent October 2, 1997 or February 10, 1997? One goal of the classes within the java.text package is parsing and formatting text properly based on the correct Locale so that the data is ...

Get Special Edition Using Java 2 Standard Edition 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.