FileDocCategorySizeDatePackage
DateFormatFile.javaAPI DocExample775Fri Apr 06 22:35:50 BST 2001None

DateFormatFile

public class DateFormatFile extends Object
Create SimpleDateFormats from a string read from a file

Fields Summary
Date
dNow
Today's Date
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


           
		DateFormatFile df = new DateFormatFile();
		BufferedReader is = 
			new BufferedReader(new InputStreamReader(System.in));
		String line;
		while ((line = is.readLine()) != null) {
			df.process(line);
		}
	
protected voidprocess(java.lang.String arg)
Use a SimpleDateFormat - based on arg - to print the date your way.

	
		SimpleDateFormat formatter = new SimpleDateFormat(arg);
		System.out.println("FORMAT: " + arg);
		System.out.println("RESULT: " + formatter.format(dNow));
		System.out.println();