I need to create dates in the format of 'Thru: 12/20' (similar to a credit/debit card expiration date). How can I generate a date in this specific format?
new Date().toJSON().slice(0,7).split('-').reverse().join('/')
Although I obtained the date in mm/yyyy format, I was unable to achieve the desired result.