HELP! * YELLOW=global GREY=local Global HTML version of Foils prepared 4 February 97

Foil 35 The Date class

From Feb 3 Delivered Lecture for Course CPS616 -- Java Lecture 4 -- AWT Through I/O CPS616 spring 1997 -- Feb 3 1997. by Nancy McCracken * See also color IMAGE
Secs 8.6
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 Sun Feb 16 1997