imported>Bale |
imported>Bale |
Line 1: |
Line 1: |
− | {{ | + | {{DISPLAYTITLE:jukebox (CLI)}} |
− | #vardefine:name|format_date_time}}{{
| |
− | #vardefine:return_type|string}}{{
| |
| | | |
− | FunctionPage|
| + | <p>This will play a song on your clan's jukebox, if your clan has one.</p> |
− | name={{#var:name}}|
| |
| | | |
− | function1={{Function|
| + | jukebox [#|mod|effect] - listen to a song |
− | name={{#var:name}}|
| |
− | aggregate={{#var:aggregate}}|
| |
− | return_type={{#var:return_type}}|
| |
− | return_also={{#var:return_also}}|
| |
− | parameter1={{Param|string|inFormat}}|
| |
− | parameter2={{Param|string|dtg}}|
| |
− | parameter3={{Param|string|outFormat}}|
| |
− | p1desc={{pspan|inFormat}} is how the input string is formatted.|
| |
− | p2desc={{pspan|dtg}} is the time to reformat.|
| |
− | p3desc={{pspan|outFormat}} is how the output string should be formatted.|
| |
− | }}|
| |
| | | |
− | function_description=Full information on [http://download.oracle.com/javase/1.3/docs/api/java/text/SimpleDateFormat.html SimpleDateFormat] here.|
| + | Possible Parameters: |
| + | * # : 1, 2, 3, 4 |
| + | * mod : meat, stats, item, initiative |
| + | * effect : Material Witness, No Worries, Techno Bliss, Metal Speed |
| | | |
− | code1={{CodeSample|
| + | [[Category:CLI Commands]] |
− | title=Code Sample|
| |
− | description=Examples of using format_date_time().|
| |
− | code=
| |
− | <syntaxhighlight>
| |
− | string input;
| |
− | string format;
| |
− | string informat;
| |
− | | |
− | input = today_to_string();
| |
− | informat = "yyyyMMdd";
| |
− | format = "yyyy MM dd";
| |
− | print(input+" * "+format_date_time(informat, input, format));
| |
− | format = "yyyy MM dd hh:mm:ss";
| |
− | print(input+" * "+format_date_time(informat, input, format));
| |
− | input = time_to_string();
| |
− | print(input+" * "+format_date_time(informat, input, format));
| |
− | informat = "hh:mm:ss z";
| |
− | print(input+" * "+format_date_time(informat, input, format));
| |
− | </syntaxhighlight>|
| |
− | moreinfo=
| |
− | This is the output:
| |
− | <pre>
| |
− | 20111206 * 2011 12 06
| |
− | 20111206 * 2011 12 06 12:00:00
| |
− | 11:43:35 EST * Bad parameter(s) passed to format_date_time
| |
− | 11:43:35 EST * 1970 01 01 11:43:35
| |
− | </pre>
| |
− | }}|
| |
− | }}
| |
− | {{SeeAlso|gameday_to_string|gameday_to_int|now_to_string|time_to_string}}
| |
− | | |
− | [[Category:Miscellaneous Functions]] | |