public class MyDateClass
   {
   public MyDateClass( Date d )
      {
      m_date = d;
      }

   public String toString()
      {
      return ms_dateFormat.format(d);
      } // all instances of this class use the same date format

   // object to build their String representation: BAD!!!
   private static SimpleDateFormat ms_dateFormat = new SimpleDateFormat( "YYYY" );
   }