nl_tokens: https : // html . spec . whatwg . org / multipage / common - microsyntaxes . html#parse - a - date - string
pl_tokens: function parseDateString ( str ) { const matches = dateRe . exec ( str ) ; if ( ! matches ) { return null ; } const year = Number ( matches [ 1 ] ) ; if ( year <= 0 ) { return null ; } const <mask> = Number ( matches [ 2 ] ) ; if ( month < 1 || month > 12 ) { return null ; } const day = Number ( matches [ 3 ] ) ; if ( day < 1 || day > numberOfDaysInMonthOfYear ( month , year ) ) { return null ; } return { year , month , day } ; }