title: Comparing dates with months as strings
body: <p>I am trying to compare these two dates :</p>
  <pre class="lang-none prettyprint-override"><code>17 Oct. 2019 (08:23)
  19 déc. 2019 (21:15)
  </code></pre>
  <p>The months are in French and the main problem is the months. Do I need to put an if statement for every type of month so I can switch it with the appropriate month? For example:</p>
  <pre><code>if (MonthValue.equals(&quot;oct.&quot;){
      DateValue.replace(&quot;oct.&quot;,&quot;10&quot;);
  }
  </code></pre>
  <p>Or is there an easier solution, because I need to check in a table if the first value is bigger than the second one.</p>
  <p>Edit :
  My new Code :</p>
  <pre><code>String target1 = &quot;17 oct. 2019 (08:23)&quot;;
          String target2 = &quot;19 déc. 2019 (21:15)&quot;;
          DateFormat df = new SimpleDateFormat(&quot;dd MMM. YYYY (kk:mm)&quot;, Locale.FRENCH);
          Date result =  df.parse(target1);  
          Date result2 =  df.parse(target2); 
          System.out.println(result);
          System.out.println(result2);
          if(result.compareTo(result2) &lt; 0) {
              System.out.println(&quot;true&quot;);
          }
          else {
              System.out.println(&quot;false&quot;);
          }
  </code></pre>
  <p>Doesn't work gives this error:</p>
  <pre><code>java.text.ParseException: Unparseable date: &quot;17 oct. 2019 (08:23)&quot;
  </code></pre>