m (Bot: Adding a template (template:mIRC identifier list)) |
m (Bot: Fixing links) |
||
Line 1: | Line 1: | ||
− | '''$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 | + | '''$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 {{mIRC|$ctime}}. |
== Synopsis == | == Synopsis == | ||
Line 5: | Line 5: | ||
== Parameters == | == Parameters == | ||
− | <span style="display: inline-block; width: 65px;">'''N'''</span>This parameter is optional, but normally would point to a value derived from | + | <span style="display: inline-block; width: 65px;">'''N'''</span>This parameter is optional, but normally would point to a value derived from {{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 | + | <span style="display: inline-block; width: 65px;">'''format'''</span>This is where the formatting options would go. If you do not specify a {{mIRC|$ctime}} number '''N''' to evaluate, the formatting is performed on the current date and time. |
== Formatting Options == | == Formatting Options == | ||
Line 54: | Line 54: | ||
== See Also == | == See Also == | ||
− | * | + | * {{mIRC|$ctime}} |
− | * | + | * {{mIRC|$date}} |
− | * | + | * {{mIRC|$time}} |
{{mIRC identifier list}} | {{mIRC identifier list}} | ||
[[Category:MIRC identifiers]] | [[Category:MIRC identifiers]] |
Revision as of 19:49, 5 July 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