mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
add some hours to birthdate to remove confusion with timezones
This commit is contained in:
parent
66f7a45f60
commit
937eabf1bd
1 changed files with 5 additions and 2 deletions
|
@ -75,8 +75,11 @@ class Birthdate extends BaseCommand {
|
|||
day = interaction.options.getInteger("day"),
|
||||
month = interaction.options.getInteger("month"),
|
||||
year = interaction.options.getInteger("year"),
|
||||
date = new Date(year, month - 1, day),
|
||||
d = Math.floor(date.getTime() / 1000);
|
||||
date = new Date(year, month - 1, day);
|
||||
|
||||
date.setHours(12);
|
||||
|
||||
const d = Math.floor(date.getTime() / 1000);
|
||||
|
||||
if (!(day == date.getDate() && month - 1 == date.getMonth() && year == date.getFullYear())) return interaction.error("economy/birthdate:INVALID_DATE");
|
||||
if (date.getTime() > Date.now()) return interaction.error("economy/birthdate:DATE_TOO_HIGH");
|
||||
|
|
Loading…
Reference in a new issue