« Return to the main article
You don't need an additional line: Just add "\." in the second line of DateComponents().
So, use "var datePat = /^(\d{1,2})(\/|-\.)(\d{1,2})\2(\d{2}|\d{4})$/;" instead of "var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2}|\d{4})$/;".
Regards - Ralf
You don't need an additional line: Just add "\." in the second line of DateComponents().
So, use "var datePat = /^(\d{1,2})(\/|-\.)(\d{1,2})\2(\d{2}|\d{4})$/;" instead of "var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2}|\d{4})$/;".
Regards - Ralf