mIRC Home    About    Download    Register    News    Help

Print Thread
#214659 11/08/09 07:50 PM
Joined: Nov 2003
Posts: 101
C
colt45 Offline OP
Vogon poet
OP Offline
Vogon poet
C
Joined: Nov 2003
Posts: 101
I'd like to use the $duration so that it would display the year instead of 53 weeks or over?

i.e.

<somenick> !seen buddynick
<somebot> buddynick was last seen 109wks 4days 23hrs 38mins 51secs ago.


I would like something to show in year format as well i.e.

<somenick> !seen buddynick
<somebot> buddynick was last seen 2yr 5wks 4days 23hrs 38mins 51secs ago.


Any solution please?

Please excuse my poor english.

Thanks

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
$duration does not handle years, you'd have to write your own custom identifier.

If you can't handle that, someone here might be able to provide a snippet, or maybe one exists (search hawkee or mirc.org)


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
There is a script already written that handles years and months as well as the default weeks, days, hours, minutes, and seconds.

I can't recall exactly where I saw it right now, but I will search and post if I'm able to find it.

Found it. Written by Riamus, the code for DateXpander can be downloaded from here

Joined: Nov 2003
Posts: 101
C
colt45 Offline OP
Vogon poet
OP Offline
Vogon poet
C
Joined: Nov 2003
Posts: 101
Many thanks, will surely give that a try.


Link Copied to Clipboard