title: Joda-Time DateFormatter to display milliseconds if nonzero
body: <p>Using <a href="http://www.joda.org/joda-time/" rel="noreferrer">Joda-Time</a>, I want to display a list of dates that may or may not have milliseconds on them.  If a certain entry has milliseconds, then it should be displayed like <code>yyyy MM dd HH:mm:ss.SSS</code>.  If it doesn't have the millis, I need it displayed as <code>yyyy MM dd HH:mm:ss</code>.</p>
  
  <p>I suppose the general question is: Is there a way to describe an optional format string parameter?</p>
  
  <p>(I'd like to avoid refactoring all of the places that I use formatters since this is a large code base.)</p>