Refactor regularDateFormat function in src/parsers/utils/regularDateFormat.js using destructuring assignment and substr method for efficient and short code.
Thanks for contributing! We are closing this PR though because:
1) It introduces a change in logic by eliminating the if-block.
2) It uses String.substr() which is marked deprecated at MDN.
Refactor regularDateFormat function in src/parsers/utils/regularDateFormat.js using destructuring assignment and substr method for efficient and short code.