| View previous topic :: View next topic |
| Author |
Message |
janii Halfop
Joined: 03 Aug 2011 Posts: 41
|
Posted: Thu Apr 19, 2012 7:40 pm Post subject: want help with a time left command |
|
|
I made a code for time left for stats reset on daily bases now i want it to show days to left until next month reset
| Code: |
duration [expr {[clock scan "tomorrow 00:00"] - [clock seconds]}] "
}
|
and it shows
Daily Stats Reset in: 19 hours 39 minutes 23 seconds
Now i want to add one more command with it tht whn sum1 do !time
the bot shall answer like this
Daily Stats Reset in: 19 hours 39 minutes 23 seconds & Monthly stats Reset in : 11 days 5 hours 59 minutes 40 seconds.
if its 19th April and month to be end on 1st May
Thanx in advance
Last edited by janii on Sun Apr 22, 2012 12:31 pm; edited 1 time in total |
|
| Back to top |
|
 |
Pixelz Voice

Joined: 15 Jun 2005 Posts: 24 Location: EFnet
|
Posted: Sat Apr 21, 2012 2:15 pm Post subject: |
|
|
This was a pretty interesting question, here you go:
| Code: | | duration [expr {[clock scan [clock format [clock scan "next month"] -format "%Y-%m-01"]] - [clock seconds]}] |
_________________ Pixelz @ EFnet, freenode, QuakeNet, Undernet |
|
| Back to top |
|
 |
janii Halfop
Joined: 03 Aug 2011 Posts: 41
|
Posted: Sun Apr 22, 2012 12:32 pm Post subject: |
|
|
ThankYou Pixelz
Your code is working perfectly now thanx once again |
|
| Back to top |
|
 |
|