Get year, month and day from parsed date
<p>I have the following code to validate a date given a date format:</p>

<pre><code>val df = new SimpleDateFormat("MM/dd/yyyy");
df.setLenient(false);

try {
   val date = df.parse("11/13/2014");
}
catch {
  case pe: ParseException =&gt; println("date error")
}
</code></pre>

<p>Now, what I need is to obtain the year, month and day in three variables. What is the best way to achieve this? Note that I need a solution based on performance as I need to validate/convert thousands of dates.</p>