I have a requirement of generating dates in this format 'Thru: 12/20'
(like credit/debit card expiry date format). What is the best way of generating date in this format?
new Date().toJSON().slice(0,7).split('-').reverse().join('/')
I got the date in mm/yyyy format but couldn't get the desired result