IDateFormatWrapper df = null; switch ( iUnit ) { case Calendar.YEAR : df = new CommonDateFormatWrapper( new SimpleDateFormat( "yyyy", locale ) ); break; case Calendar.MONTH : df = new MonthDateFormat( locale ); break; case Calendar.DATE : df = new CommonDateFormatWrapper( DateFormat.getDateInstance( DateFormat.LONG, locale ) ); break; case Calendar.HOUR_OF_DAY : df = new HourDateFormat( locale ); break; case Calendar.MINUTE : case Calendar.SECOND : df = new CommonDateFormatWrapper( new SimpleDateFormat( "HH:mm:ss", locale ) ); break;  } return df;
return getPreferredDateFormat( iUnit, ULocale.getDefault( ) );
	public static final IDateFormatWrapper getPreferredDateFormat( int iUnit,			ULocale locale )	{		IDateFormatWrapper df = null;		switch ( iUnit )		{			case Calendar.YEAR :				df = new CommonDateFormatWrapper( new SimpleDateFormat( "yyyy", //$NON-NLS-1$						locale ) );				break;			case Calendar.MONTH :				df = new MonthDateFormat( locale );				break;			case Calendar.DATE :				df = new CommonDateFormatWrapper( DateFormat.getDateInstance( DateFormat.LONG,						locale ) );				break;			case Calendar.HOUR_OF_DAY :				df = new HourDateFormat( locale );				break;			case Calendar.MINUTE :			case Calendar.SECOND :				df = new CommonDateFormatWrapper( new SimpleDateFormat( "HH:mm:ss", //$NON-NLS-1$						locale ) );				break;		}		return df;	}