Working with Dates

The utilities provided by Java are by no means limited to data containers. Part of the Java API consists of a number of classes useful for creating and manipulating dates. When Java's support for internationalization was introduced with the 1.1 release, the date-related classes in the language were obviously impacted significantly. For this reason, most of the discussion of dates is held until Chapter 24, "Using Internationalization." However, this section covers the Date class in particular, which provides some useful functionality for representing a specific instant in time and comparing two such values.

The Date Class

The Date class represents a specific date and time. It is centered around the Epoch, which is midnight GMT ...

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.