How to convert the given date to dd-mm-yy format in javascript? : <p>How to convert the given date to format.</p>

<p>Input: Sun, 11 Jun 2017 14:14:37 GMT</p>

<p>Output: 11-06-17 DD-MM-YY</p>

<p>I have tried <code>split</code> and then the mapping of month text to month number. </p>
