package com.mindprod.inauguration;
import java.text.DateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.TimeZone;
import static java.lang.System.*;
/**
* countdown to next US Presidential inauguration.
* <p/>
* Demonstrates use of default date format for locale.
*
* @author Roedy Green, Canadian Mind Products
* @version 1.3 2009-01-20 change to Obama
* @since 2000
*/
public final class InaugurationDefault
{
/**
* locale specific: e.g. Jan 20, 2005
*/
private static final DateFormat DF = DateFormat.getDateInstance();
/**
* Main method.
*
* @param args not used
*/
public static void main( String[] args )
{
final int inaugYear = 2017;
TimeZone est = TimeZone.getTimeZone( "America/New_York" );
GregorianCalendar inauguration = new GregorianCalendar( est );
inauguration.set( inaugYear, Calendar.JANUARY, 20, 12, 0, 0 );
DF.setTimeZone( est );
DF.setCalendar( inauguration );
String dateString = DF.format( inauguration.getTime() );
out.println( dateString );
}
}