m |
|||
Line 6: | Line 6: | ||
== Parameters == | == Parameters == | ||
<span style="display: inline-block; width: 65px;">'''N'''</span>This parameter is optional, but normally would point to a value derived from [[$ctime identifier - mIRC|$ctime]]. | <span style="display: inline-block; width: 65px;">'''N'''</span>This parameter is optional, but normally would point to a value derived from [[$ctime identifier - mIRC|$ctime]]. | ||
+ | |||
<span style="display: inline-block; width: 65px;">'''format'''</span>This is where the formatting options would go. If you do not specify a [[$ctime identifier - mIRC|$ctime]] number '''N''' to evaluate, the formatting is performed on the current date and time. | <span style="display: inline-block; width: 65px;">'''format'''</span>This is where the formatting options would go. If you do not specify a [[$ctime identifier - mIRC|$ctime]] number '''N''' to evaluate, the formatting is performed on the current date and time. | ||
Revision as of 21:09, 23 June 2014
$asctime can be used to return the time and date in an optional text format. The time and date can be taken from the current time, or you can use $asctime to format a date in relation to $ctime.
Synopsis
$asctime[([N,]format)]
Parameters
NThis parameter is optional, but normally would point to a value derived from $ctime.
formatThis is where the formatting options would go. If you do not specify a $ctime number N to evaluate, the formatting is performed on the current date and time.
Formatting Options
Property | Format | Result |
---|---|---|
Day | dddddddddd | 101MonMonday |
Month | mmmmmmmmmm | 101JanJanuary |
Year | yyyyy | 142014 |
Hours | hhhHHH | 5051313 |
Minutes | nnn | 101 |
Seconds | sss | 101 |
AM/PM | tttTTT | a/pam/pmA/PAM/PM |
Ordinal | oo | st nd rd th |
Timezone | zzzzzz | +o+oooo+oooo GMT |
Quick Note: All of the formatting parameters can touch each other, and they will be properly converted. For example: $asctime(hhnnss) would return the hours, minutes, and seconds all touching each other in a terrible format.
Examples
Echo the current date and time
//echo -a $asctime
Echo the current date in the format Month Day, Year
//echo -a $asctime(mmmm $+(dd,$chr(44)) yyyy)
Using the $ctime of 840240070, format to Day Month Year hour:minute<am/pm>
//echo -a $asctime(840240070,dd mmmm yyyy hh:nntt)
Using the orbital format, we can add the proper orbitals to date digits
//echo -a $asctime(mmmm $+(doo,$chr(44)) yyyy)
Compatibility
Added: mIRC v4.5
Added On: 30/06/96