From WikiChip
Difference between revisions of "mirc/identifiers/$duration"
m (Bot: Adding a template (template:mIRC identifier list)) |
m |
||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | 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. | + | {{mirc title|$duration Identifier}}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 == | == Synopsis == | ||
Line 24: | Line 25: | ||
== Compatibility == | == Compatibility == | ||
− | + | {{mIRC compatibility|4.7}} | |
− | |||
− | |||
== See Also == | == See Also == | ||
− | * | + | * {{mIRC|$asctime}} |
− | * | + | * {{mIRC|$time}} |
{{mIRC identifier list}} | {{mIRC identifier list}} | ||
− | [[Category: | + | [[Category:mIRC identifiers|duration]] |
Revision as of 15:01, 20 September 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
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 Dec 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See Also
mIRC identifier list