$asctime » History » Version 20
Per Amundsen, 11/06/2014 08:44 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 | 20 | Per Amundsen | N - A unix timestamp. ([[$ctime]]) |
14 | 1 | Per Amundsen | 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 | 10 | Per Amundsen | |
33 | 2 | Per Amundsen | Month |
34 | 11 | Per Amundsen | |
35 | |
||
36 | |
||
37 | 2 | Per Amundsen | Day |
38 | 12 | Per Amundsen | |
39 | |
||
40 | |
||
41 | 2 | Per Amundsen | Hours |
42 | 13 | Per Amundsen | |
43 | |
||
44 | |
||
45 | 2 | Per Amundsen | Minutes |
46 | 14 | Per Amundsen | |
47 | 2 | Per Amundsen | Seconds |
48 | 14 | Per Amundsen | |
49 | 2 | Per Amundsen | AM/PM |
50 | 15 | Per Amundsen | |
51 | 1 | Per Amundsen | |
52 | 18 | Per Amundsen | |
53 | 17 | Per Amundsen | Ordinal |
54 | 2 | Per Amundsen | Timezone |
55 | 3 | Per Amundsen | | yy |
56 | yyyy |
||
57 | m |
||
58 | mm |
||
59 | mmm |
||
60 | mmmm |
||
61 | d |
||
62 | dd |
||
63 | ddd |
||
64 | dddd |
||
65 | h |
||
66 | hh |
||
67 | H |
||
68 | HH |
||
69 | n |
||
70 | nn |
||
71 | s |
||
72 | ss |
||
73 | t |
||
74 | tt |
||
75 | T |
||
76 | TT |
||
77 | 15 | Per Amundsen | oo |
78 | z |
||
79 | zz |
||
80 | zzz |
||
81 | 19 | Per Amundsen | | 99 |
82 | 1999 |
||
83 | 1 |
||
84 | 01 |
||
85 | Jan |
||
86 | January |
||
87 | 1 |
||
88 | 01 |
||
89 | Mon |
||
90 | Monday |
||
91 | 5 |
||
92 | 05 |
||
93 | 13 |
||
94 | 13 |
||
95 | 1 |
||
96 | 01 |
||
97 | 1 |
||
98 | 01 |
||
99 | a/p |
||
100 | am/pm |
||
101 | A/P |
||
102 | AM/PM |
||
103 | st/nd/rd/th |
||
104 | +0 |
||
105 | +0000 |
||
106 | +0000 GMT |
||
107 | 2 | Per Amundsen | | |