FileDocCategorySizeDatePackage
CalCalcs.javaAPI DocExample671Sun Feb 08 21:33:46 GMT 2004None

CalCalcs

public class CalCalcs extends Object
Show some calendar calculations.
author
Ian F. Darwin, http://www.darwinsys.com/
version
$Id: CalCalcs.java,v 1.3 2004/02/09 03:33:45 ian Exp $

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

		//+
		Calendar c = Calendar.getInstance();
		System.out.println("I got a " + c.getClass());
		c.set(1951, 03, 24, 12, 30, 0);
		System.out.println("I set it to " + c.getTime().toString());
		System.out.println("I actually set the year to " +c.get(Calendar.YEAR));
		System.out.println("In milliseconds, that's " + c.getTime().getTime());
		System.out.println("Or, in seconds, " + c.getTime().getTime()/1000);
		//-