title: How to get today's date in Groovy
body: <p>I am trying to get today's date in format of <code>yyyyMMdd</code> in groovy language.</p>
  
  <p>I have tried to do this:</p>
  
  <pre><code>String oldDate = '20150702'
  Date date = Date.parse( 'yyyyMMdd', oldDate )
  String currentDate = date.format( 'yyyyMMdd' )
  </code></pre>
  
  <p>Output: 20150702</p>
  
  <p>I am trying to get today's date however.</p>