From 38316f30ac7f79ffa70e0ec3765dba268f099c71 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Fri, 7 Jan 2022 23:56:34 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20bank?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Economy/birthdate.js | 2 ++ languages/ru-RU/economy/deposit.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/Economy/birthdate.js b/commands/Economy/birthdate.js index c50cbee9..b28d1c84 100644 --- a/commands/Economy/birthdate.js +++ b/commands/Economy/birthdate.js @@ -30,7 +30,9 @@ class Birthdate extends Command { const tday = +match[0], tmonth = +match[1] - 1; let tyear = +match[2]; + if (tyear < 100) tyear += tyear < 50 ? 2000 : 1900; + const d = new Date(tyear, tmonth, tday); if (!(tday == d.getDate() && tmonth == d.getMonth() && tyear == d.getFullYear())) return message.error("economy/birthdate:INVALID_DATE"); if (d.getTime() > Date.now()) return message.error("economy/birthdate:DATE_TOO_HIGH"); diff --git a/languages/ru-RU/economy/deposit.json b/languages/ru-RU/economy/deposit.json index e37370e8..836a94e4 100644 --- a/languages/ru-RU/economy/deposit.json +++ b/languages/ru-RU/economy/deposit.json @@ -4,6 +4,6 @@ "EXAMPLES": "{{prefix}}deposit 1000", "MISSING_AMOUNT": "Укажите сумму!", "NO_CREDIT": "У вас нет кредитов!", - "NO_ENOUGH_CREDIT": "У вас нет `{{money}}`!", + "NOT_ENOUGH_CREDIT": "У вас нет `{{money}}`!", "SUCCESS": "{{money}} внесено на ваш банковский счёт!" } \ No newline at end of file