From WikiChip
Editing mirc/identifiers/$duration
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
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. | |
− | |||
− | |||
== Synopsis == | == Synopsis == | ||
<pre>$duration(seconds,N)</pre> | <pre>$duration(seconds,N)</pre> | ||
− | + | ||
== Parameters == | == Parameters == | ||
{{ArgsList | {{ArgsList | ||
Line 11: | Line 9: | ||
| N | Can be either '''2''', which omits seconds from the results, or '''3''', which returns the time in hh:nn:ss format | | N | Can be either '''2''', which omits seconds from the results, or '''3''', which returns the time in hh:nn:ss format | ||
}} | }} | ||
− | + | ||
== Example == | == Example == | ||
Echo the formatting for '''38711810 seconds''': | Echo the formatting for '''38711810 seconds''': | ||
Line 18: | Line 16: | ||
'''Result''' | '''Result''' | ||
<pre>64wks 1hr 16mins 50secs</pre> | <pre>64wks 1hr 16mins 50secs</pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Echo the formatting for converting '''64wks 1hr 16mins 50secs''' back to seconds: | Echo the formatting for converting '''64wks 1hr 16mins 50secs''' back to seconds: | ||
<source lang="mIRC">//echo -a $duration(64wks 1hr 16mins 50secs)</source> | <source lang="mIRC">//echo -a $duration(64wks 1hr 16mins 50secs)</source> | ||
+ | |||
'''Result''' | '''Result''' | ||
<pre>38711810</pre> | <pre>38711810</pre> | ||
− | + | == Compatibility == | |
− | + | Added: mIRC v4.7 | |
+ | |||
+ | Added On: 09/12/96 | ||
− | |||
− | |||
== See Also == | == See Also == | ||
− | * | + | * [[$asctime identifier - mIRC|$asctime]] |
− | * | + | * [[$time identifier - mIRC|$time]] |
+ | {{mIRC identifier list}} | ||
+ | |||
+ | [[Category:MIRC identifiers]] |