title: How to get month index from month name using date-fns library
body: <p>I need to get the month index number from the month name using the <code>date-fns</code> library. Earlier I was using <code>moment.js</code>, it was straightforward with <code>moment.js</code></p>
  <pre><code>  moment().month('March').format('M'); 
  // Month name will be variable and I don't want to use static dictionary to get index number
  </code></pre>
  <p>How to achieve the same using the <code>date-fns</code> library? I thought to use <code>format(date, 'M');</code> but it needs complete date and only month name is available.</p>
  <p>Please suggest. Thanks!</p>