* fix: bug that accepted 3 digit year * fix: bug that accepted 3 digit year * Update packages/ui/components/localize/test/date/parseDate.test.js --------- Co-authored-by: Thijs Louisse <t_louisse@hotmail.com>
8 lines
143 B
JavaScript
8 lines
143 B
JavaScript
/**
|
|
*
|
|
* @param {string} year
|
|
* @returns {boolean}
|
|
*/
|
|
export function isCorrectYearFormat(year) {
|
|
return /^\d{2}(\d{2})?$/g.test(year);
|
|
}
|