mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-05 11:12:56 +00:00
dev day #90 🥳
This commit is contained in:
@@ -130,11 +130,8 @@ function calculateAge(iso: string): number | null {
|
||||
}
|
||||
|
||||
function czYears(n: number): string {
|
||||
const mod100 = n % 100;
|
||||
if (mod100 >= 11 && mod100 <= 14) return 'let';
|
||||
const mod10 = n % 10;
|
||||
if (mod10 === 1) return 'rok';
|
||||
if (mod10 >= 2 && mod10 <= 4) return 'roky';
|
||||
if (n === 1) return 'rok';
|
||||
if (n >= 2 && n <= 4) return 'roky';
|
||||
return 'let';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user