mIRC Home    About    Download    Register    News    Help

Print Thread
#53853 12/10/03 04:19 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
//echo a $duration(222222,3) - $duration(222222)

returns:
a 61:43:42 - 2days 13hrs 43mins 42secs

Ok, thru calculations Ive discovered that 61 (hours) = 2 days plus 13 hours...... so is days no longer calculated in the dig duration?

Same type of results with:

//echo a $duration(2222222222,3) - $duration(2222222222)
returns:

617283:57:02 - 3674wks 2days 3hrs 57mins 2secs

617283 = 3674wks 2days 3hrs in total hours


Those who fail history are doomed to repeat it
#53854 12/10/03 08:15 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
...so is days no longer calculated in the dig duration?

It never did use days, this is from 6.10 versions.txt smile
40.$duration() can now handle h:m:s format and if N = 3 it outputs
in h:m:s format.

#53855 12/10/03 08:36 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
I thought it did (maybe supposed to?????).............. oh well, no biggie


Those who fail history are doomed to repeat it
#53856 12/10/03 09:02 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
It's pretty easy to add days to it if you want
Code:
alias daydur { return $+($iif($int($calc($$1 / 86400)),$ifmatch $+ :),$duration($calc($1 % 86400),3)) }


Link Copied to Clipboard