holi
This commit is contained in:
parent
b55d99ccfd
commit
b058b84fb3
4
bot.js
4
bot.js
@ -73,12 +73,12 @@ bot.onText(/\/cuandoLaRevision/, (msg, match) => {
|
||||
} else {
|
||||
if (date.getTime() > now.getTime()) {
|
||||
const diffTime = Math.abs(date - now);
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)) - 1;
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
bot.sendMessage(chatId, "Wait prrito todavía te faltan " + diffDays + " días.").then(() => {});
|
||||
} else {
|
||||
|
||||
const diffTime = Math.abs(now - date);
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)) - 1;
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
const diffHrs = Math.floor((diffTime % 86400000) / 3600000); // hours
|
||||
const diffMinutes = Math.round(((diffTime % 86400000) % 3600000) / 60000); // minutes
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user