FileDocCategorySizeDatePackage
DateFormatBest.javaAPI DocExample569Wed Mar 03 11:22:14 GMT 2004None

DateFormatBest

public class DateFormatBest extends Object
The "best" way to format a date/time is to use the DateFormat.getInstance() method, which will be localized automatically.
version
$Id: DateFormatBest.java,v 1.1 2004/03/03 17:22:14 ian Exp $

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

		Date today = new Date();

		DateFormat df = DateFormat.getInstance();
		System.out.println(df.format(today));

		DateFormat df_fr = 
			DateFormat.getDateInstance(DateFormat.FULL, Locale.FRENCH);
		System.out.println(df_fr.format(today));