I have a string of a date in javascript in format #1. I need to convert it to format #2.
The problem starts when one format is "dd/mm/yy" and the other is "mm/dd/yy".
The formats change dynamically and I have the formats as strings, but I need a function like
Date newDate = convert(currentDate, currentFormatString, newFormatString).
How can I do it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…