(Created $asctime identifier - mIRC) |
m |
||
(8 intermediate revisions by 2 users 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 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 5: | 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 | + | <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 == | ||
− | {| class="wikitable" style="width: | + | {| class="wikitable" style="margin-left: 185px; width: 450px;" |
|- | |- | ||
! '''Property''' !! Format !! Result | ! '''Property''' !! Format !! Result | ||
Line 48: | Line 50: | ||
== Compatibility == | == Compatibility == | ||
− | + | {{mIRC compatibility|4.5}} | |
− | |||
− | |||
== See Also == | == See Also == | ||
− | * | + | * {{mIRC|$ctime}} |
− | * | + | * {{mIRC|$date}} |
− | * | + | * {{mIRC|$time}} |
+ | {{mIRC identifier list}} | ||
− | [[Category:mIRC identifiers]] | + | [[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.