Regular Expression for Pattern Attribute in Form Field

MySQL databases accept dates in many different formats. For example, YY-MM-DD, YYYY:MM:DD, YYYYMMDD, and YYYY-MM-DD, among the myriad options for date formatting. (Y is for year, M is for month, and D is for day.) Embracing HTML5’s pattern form attribute, which accepts a regular expression pattern, I wanted to accept dates from 0000-00-00 through 2015-12-31. […]