Compare commits

...

2 Commits

Author SHA1 Message Date
eb8bee65d9 Fix module res?
All checks were successful
Publish Package / build-and-publish (push) Successful in 7s
2026-04-27 23:48:08 +01:00
fc4c8745a6 Fix the date validator, was checking indexes, not values!
All checks were successful
Publish Package / build-and-publish (push) Successful in 8s
2026-04-27 23:39:36 +01:00
2 changed files with 3 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ export const IsValidDateStr = (s: string): boolean => {
for (let i = 0; i < 10; i++) { for (let i = 0; i < 10; i++) {
if (i === 4 || i === 7) continue; if (i === 4 || i === 7) continue;
const c = s.charCodeAt(i); const c = s.charCodeAt(i);
if (!isDigit(i)) return false; if (!isDigit(c)) return false;
} }
const y = parseInt(s.substring(0, 4), 10); const y = parseInt(s.substring(0, 4), 10);

View File

@@ -7,9 +7,9 @@
// Environment Settings // Environment Settings
// See also https://aka.ms/tsconfig/module // See also https://aka.ms/tsconfig/module
"module": "esnext", "module": "nodenext",
"target": "esnext", "target": "esnext",
"moduleResolution": "bundler", "moduleResolution": "nodenext",
"baseUrl": ".", "baseUrl": ".",
"types": [], "types": [],
// For nodejs: // For nodejs: