I have CSV with dates in format DD-MM-YYYY but sometimes I work in Excel and it changes the dates to format DD/MM/YYYY
Code example
var dateParts = value['TAX_CALCULATION_DATE'].split("/"); //id date has "-" or "/"
var dateObject = new Date(+dateParts[2], dateParts[1] - 1, +dateParts[0]);
firestoreObject.TAX_CALCULATION_DATE = firebase.firestore.Timestamp.fromDate(dateObject);
How to include "/" and "-" in one split?