m (Bot: Fixing links) |
m |
||
| (4 intermediate revisions by one other user not shown) | |||
| 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 {{mIRC|$ctime}}. | + | {{mirc title|$asctime Identifier}}'''$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 49: | Line 50: | ||
== Compatibility == | == Compatibility == | ||
| − | + | {{mIRC compatibility|4.5}} | |
| − | |||
| − | |||
== See Also == | == See Also == | ||
| Line 59: | Line 58: | ||
{{mIRC identifier list}} | {{mIRC identifier list}} | ||
| − | [[Category: | + | [[Category:mIRC identifiers|asctime]] |
Latest revision as of 13:25, 20 September 2017
$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[edit]
$asctime[([N,]format)]
Parameters[edit]
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[edit]
| 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[edit]
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[edit]
Added: mIRC v4.5
Added on: 30 Jun 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.