$asctime » History » Version 22
Per Amundsen, 02/16/2023 05:19 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 | 22 | Per Amundsen | table(ktable). |
14 | |*Parameter*|*Description*| |
||
15 | | N | A unix timestamp. ([[$ctime]]) | |
||
16 | | format | Date format to return. | |
||
17 | 1 | Per Amundsen | |
18 | *Example* |
||
19 | |||
20 | <pre> |
||
21 | 21 | Per Amundsen | ; Returns the default text format for this time value. |
22 | 1 | Per Amundsen | //echo -ag $asctime(793947600) |
23 | |||
24 | 21 | Per Amundsen | ; Returns the current time in hh:nn:ss format. |
25 | 1 | Per Amundsen | //echo -ag $asctime(hh:nn:ss) |
26 | |||
27 | 21 | Per Amundsen | ; Returns the date for this time value. |
28 | 1 | Per Amundsen | //echo -ag $asctime(793947600, dd/mm/yy) |
29 | </pre> |
||
30 | 2 | Per Amundsen | |
31 | *Format* |
||
32 | |||
33 | 8 | Per Amundsen | |^. Year |
34 | 10 | Per Amundsen | |
35 | 2 | Per Amundsen | Month |
36 | 11 | Per Amundsen | |
37 | |
||
38 | |
||
39 | 2 | Per Amundsen | Day |
40 | 12 | Per Amundsen | |
41 | |
||
42 | |
||
43 | 2 | Per Amundsen | Hours |
44 | 13 | Per Amundsen | |
45 | |
||
46 | |
||
47 | 2 | Per Amundsen | Minutes |
48 | 14 | Per Amundsen | |
49 | 2 | Per Amundsen | Seconds |
50 | 14 | Per Amundsen | |
51 | 2 | Per Amundsen | AM/PM |
52 | 15 | Per Amundsen | |
53 | 1 | Per Amundsen | |
54 | 18 | Per Amundsen | |
55 | 17 | Per Amundsen | Ordinal |
56 | 2 | Per Amundsen | Timezone |
57 | 3 | Per Amundsen | | yy |
58 | yyyy |
||
59 | m |
||
60 | mm |
||
61 | mmm |
||
62 | mmmm |
||
63 | d |
||
64 | dd |
||
65 | ddd |
||
66 | dddd |
||
67 | h |
||
68 | hh |
||
69 | H |
||
70 | HH |
||
71 | n |
||
72 | nn |
||
73 | s |
||
74 | ss |
||
75 | t |
||
76 | tt |
||
77 | T |
||
78 | TT |
||
79 | 15 | Per Amundsen | oo |
80 | z |
||
81 | zz |
||
82 | zzz |
||
83 | 19 | Per Amundsen | | 99 |
84 | 1999 |
||
85 | 1 |
||
86 | 01 |
||
87 | Jan |
||
88 | January |
||
89 | 1 |
||
90 | 01 |
||
91 | Mon |
||
92 | Monday |
||
93 | 5 |
||
94 | 05 |
||
95 | 13 |
||
96 | 13 |
||
97 | 1 |
||
98 | 01 |
||
99 | 1 |
||
100 | 01 |
||
101 | a/p |
||
102 | am/pm |
||
103 | A/P |
||
104 | AM/PM |
||
105 | st/nd/rd/th |
||
106 | +0 |
||
107 | +0000 |
||
108 | +0000 GMT |
||
109 | 2 | Per Amundsen | | |