title: How can I make a leading zero in DateTime-Pattern optional
body: <p>I have a user input field and would like to parse his date, whatever he puts in.</p>
  
  <p>The user might provide his date with a leading zero or without one, so I wanna be able to parse an input like this </p>
  
  <pre><code>02.05.2019
  </code></pre>
  
  <p>and also this</p>
  
  <pre><code>2.5.2019
  </code></pre>
  
  <p>But as far as I can tell there is no way to make the leading zero optional, either always have 2 digits like 01, 03, 12 and so on, or only have the necessary digits like 1, 3, 12.</p>
  
  <p>So apparently I have to decide whether to allow leading zeros or not, but is there seriously no way to make the leading zero optional ?</p>
  
  <hr>
  
  <p>Well, I tested a pattern that included a leading zero dd.MM.uuuu and I tested a pattern that did not include a leading zero d.M.uuuu and when I parsed the wrong input with the wrong pattern exceptions were thrown.</p>
  
  <p>Therefore my question is if there is a way to make the leading zero optional.</p>