title: Remove leading zeros from month with String.format in Java
body: <p>How can I extract the month of a date object as a number without leading zeros using <code>String.format</code>?</p>
  
  <p>Here is example code:</p>
  
  <pre><code>String.format("%tm", new java.util.Date())
  </code></pre>
  
  <p>If the month is February, this expression will produce the string "02", but I need to produce "2".</p>
  
  <p>I must use <code>String.format</code>. I cannot use methods from other classes such as <code>DateFormat</code> or <code>SimpleDateFormat</code>.</p>