fix: reject invalid dates in analytics
This commit is contained in:
@@ -143,7 +143,9 @@ export function parseDateTR(s) {
|
||||
if (!s) return null;
|
||||
const m = String(s).match(/(\d{1,2})[.\/](\d{1,2})[.\/](\d{4})/);
|
||||
if (!m) return null;
|
||||
return new Date(Number(m[3]), Number(m[2]) - 1, Number(m[1]));
|
||||
const day=Number(m[1]),month=Number(m[2]),year=Number(m[3]);
|
||||
const date=new Date(year,month-1,day);
|
||||
return date.getFullYear()===year && date.getMonth()===month-1 && date.getDate()===day ? date : null;
|
||||
}
|
||||
|
||||
// --- Firmanın kendi performansı (kullanıcının kanban/takip durumundan) ---
|
||||
|
||||
Reference in New Issue
Block a user