title: How to change date format in cypress
body: <p>Scenario:</p>
  
  <p>I have a data_value in field input_date as: 30/06/2020 13:40
  How can I test another div contains the same value in another format - 23rd June 2020 13:40</p>
  
  <pre><code>const inp_date = cy.get('input_date').invoke('val')
  cy.get('div').should('contain', inp_date)
  </code></pre>
  
  <p>How will I format inp_date so that it is in the format 23rd June 2020 13:40</p>
  
  <p>NOTE:  input_date and  are in two different pages. Means, When I am in the page where I need to test the div, input will not be available</p>
  
  <p><a href="https://i.stack.imgur.com/ZoKtT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZoKtT.png" alt="enter image description here"></a></p>