HELP! * GREY=local LOCAL HTML version of Foils prepared July 10 1996

Foil 123 The Date class

From Basic Lectures on Java Language Applets Graphics Networking Trip to China and Icase Tutorial -- July 12-28 and June 10-13 96. by Geoffrey C. Fox * See also color IMAGE

This class exists to provide an implementation of "date" structures. As is typical of data encapsulation classes, it has methods to create dates, obtain and set the parts of dates, and convert dates to other data types.
The constructor either creates today's date or any other day (and time) that you provide:
  • Date today = new Date();
  • Date ancient = new Date(999,12,31); /* Dec. 31, 999 */
  • Date deadline = new Date(1996,12,31,23,59,59)
    • /* Dec.31,1996 at 23:59:59 */



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Feb 18 1997