Code example for FieldPosition

0
  time: 13:14 
  datetime: 20.04.10 13:14 
 
*/ 
 
private static FieldPosition fy = new FieldPosition( DateFormat.YEAR_FIELD );
public static String withoutYear( DateFormat df, Date t) {
    StringBuffer x = df.format( t, new StringBuffer(), fy );
    //delete the year 
    x.delete( fy.getBeginIndex(), fy.getEndIndex() );
    //try delete the redundant separator 
    String pat = x.toString();
    pat = pat.replaceFirst( "^[ -/.,]*", "");
    pat = pat.replaceFirst( "[ -/.,]*$", "");
    return pat;
} 
 
 
static public android.text.format.DateFormat andate = new android.text.format.DateFormat();
static public 
abstract class dtfm {