$asctime » History » Version 8
Per Amundsen, 11/06/2014 08:41 PM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *$asctime* |
||
4 | |||
5 | Returns current date and time. (Day Month Date XX:XX:XX Year format) |
||
6 | |||
7 | *$asctime(N,format)* |
||
8 | |||
9 | Returns the time and date in text format associated with the [[$ctime]] time value. |
||
10 | |||
11 | *Parameters* |
||
12 | |||
13 | N - A unix timestamp. |
||
14 | format - Date format to return. |
||
15 | |||
16 | *Example* |
||
17 | |||
18 | <pre> |
||
19 | ;Returns the default text format for this time value. |
||
20 | //echo -ag $asctime(793947600) |
||
21 | |||
22 | ;Returns the current time in hh:nn:ss format. |
||
23 | //echo -ag $asctime(hh:nn:ss) |
||
24 | |||
25 | ;Returns the date for this time value. |
||
26 | //echo -ag $asctime(793947600, dd/mm/yy) |
||
27 | </pre> |
||
28 | 2 | Per Amundsen | |
29 | *Format* |
||
30 | |||
31 | 8 | Per Amundsen | |^. Year |
32 | 2 | Per Amundsen | Month |
33 | Day |
||
34 | Hours |
||
35 | Minutes |
||
36 | Seconds |
||
37 | AM/PM |
||
38 | Ordinal |
||
39 | Timezone |
||
40 | 3 | Per Amundsen | | yy |
41 | yyyy |
||
42 | m |
||
43 | mm |
||
44 | mmm |
||
45 | mmmm |
||
46 | d |
||
47 | dd |
||
48 | ddd |
||
49 | dddd |
||
50 | h |
||
51 | hh |
||
52 | H |
||
53 | HH |
||
54 | n |
||
55 | nn |
||
56 | s |
||
57 | ss |
||
58 | t |
||
59 | tt |
||
60 | T |
||
61 | TT |
||
62 | 2 | Per Amundsen | | |