From WikiChip
mirc/identifiers/$duration
< mirc‎ | identifiers
Revision as of 11:42, 2 July 2014 by Zmodem (talk | contribs) (Created $duration identifier - mIRC)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The $duration identifier can take a specified number of seconds and return it in weeks/days/hours/minutes/seconds format. After a value has been returned, the new value can even be used with the identifier in order to return the number of seconds.

Synopsis

$duration(seconds,N)

Parameters

seconds The specific number of seconds to get the formatting for
N Can be either 2, which omits seconds from the results, or 3, which returns the time in hh:nn:ss format

Example

Echo the formatting for 38711810 seconds:

//echo -a $duration(38711810)

Result

64wks 1hr 16mins 50secs

Echo the formatting for converting 64wks 1hr 16mins 50secs back to seconds:

//echo -a $duration(64wks 1hr 16mins 50secs)

Result

38711810

Compatibility

Added: mIRC v4.7

Added On: 09/12/96

See Also