Using the time variables to make some maths

Hi! I look it up before asking this and i can’t found it, so, sorry if there is any post about it. And i want to clarify that English is not my first language, so, sorry if i couldn’t make my self clear.

I want to take, for example, the minutes variable to make that when i use the command !late Nightbot make some maths with the actual hour and certain time. For example let’s say that the stream has to start at 13:00, and the streamer start it a few minutes later, i want to make a command that says: “You are xx min late.”

1 Like

i think this will get u what u’re lookin for…

You are $(countup 13:00:00 TZ) late.

just don’t forget to change “TZ” to the proper timezone… acceptable timezones can be found here

Yes! That’s it, thanks you! Now i’m trying to use the format time to just take the minutes and the response should be “You are (count up that just print the minutes) minutes late”, i can’t make it work yet. Maybe you can help me solve it?

what does it say now?.. oh wait, r u trying to get it to skip the seconds?..
if trying to leave out the seconds…

You are $(eval let a=`$(countup 13:00:00 TZ)`.split(` `),b=``,c=0;while(c<a.length){b+=a[c]+` `;c++;if(a[c].toLowerCase().includes(`min`)){c=a.length}};b) late.

same thing, just make sure to add the proper timezone instead of “TZ” ^^