| View previous topic :: View next topic |
| Author |
Message |
Gewan Voice
Joined: 25 Dec 2010 Posts: 27
|
Posted: Mon Oct 24, 2011 3:18 am Post subject: Request: Simple script to return current week~ |
|
|
Hiya!
I rarely know which week we're currently in. In fact, I usually either visit www.vecka.nu or execute "date +%W" (under -NIX) to get knowledge.
It sounds like an easy piece of work to write a TCL script for example:
| Quote: | <User> !week
<Bot> We're currently in week 43. |
Now would it?
I'd be much grateful!
Cheers~ |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Mon Oct 24, 2011 9:48 am Post subject: |
|
|
Try this:
| Code: |
bind pub - "!week" get_week
proc get_week {nick uhost handle chan text} {
putserv "privmsg $chan :We're currently in week [clock format [clock scan now] -format %V]."
}
|
|
|
| Back to top |
|
 |
Gewan Voice
Joined: 25 Dec 2010 Posts: 27
|
Posted: Wed Oct 26, 2011 2:45 pm Post subject: Works a charm! |
|
|
| Many thanks willyw; your work is brilliant! |
|
| Back to top |
|
 |
|