Skip to content

Commit bbdeceb

Browse files
committed
Add function help
1 parent 09f5ee6 commit bbdeceb

File tree

8 files changed

+242
-0
lines changed

8 files changed

+242
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h3>Conditionals Group</h3>
2+
This group contains functions to handle conditional checks in expressions.

resources/function_help/format-en_US

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<h3>format() function</h3>
2+
Format a string using supplied arguments.
3+
4+
<h4>Syntax</h4>
5+
<code>format('string', arg, [arg...n])</code><br>
6+
7+
<h4>Arguments</h4>
8+
<code>string</code> - is string. String with Qt QString place holders. Use %1, %2, etc for placeholders. Placeholders can be repeated.
9+
<br>
10+
<code>arg [arg...n]</code> - any type. Any number of args.
11+
12+
<h4>Example</h4>
13+
<!-- Show example of function.-->
14+
<code>format('This %1 a %2','is', 'test') &rarr; This is a test</code><br>
+174
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
<h3>format_date() function</h3>
2+
Format a date type or string into a custom string format. Uses Qt data time format strings. See <a href='http://qt-project.org/doc/qt-4.8/qdatetime.html#toString'>QDateTime::toString</a>
3+
4+
<h4>Syntax</h4>
5+
<code>format_date('string', 'format_string')</code><br>
6+
7+
<h4>Arguments</h4>
8+
<code>string</code> - is string. Date/Time/DateTime string.
9+
<br>
10+
<code>format_string</code> - is string. String template used to format the string.
11+
12+
<table>
13+
<thead>
14+
<tr>
15+
<th>Expression</th>
16+
17+
<th>Output</th>
18+
</tr>
19+
</thead>
20+
21+
<tr valign="top">
22+
<td>d</td>
23+
24+
<td>the day as number without a leading zero (1 to 31)</td>
25+
</tr>
26+
27+
<tr valign="top">
28+
<td>dd</td>
29+
30+
<td>the day as number with a leading zero (01 to 31)</td>
31+
</tr>
32+
33+
<tr valign="top">
34+
<td>ddd</td>
35+
36+
<td>the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses <a href=
37+
"qdate.html#shortDayName">QDate::shortDayName</a>().</td>
38+
</tr>
39+
40+
<tr valign="top">
41+
<td>dddd</td>
42+
43+
<td>the long localized day name (e.g. 'Monday' to 'Sunday'). Uses <a href=
44+
"qdate.html#longDayName">QDate::longDayName</a>().</td>
45+
</tr>
46+
47+
<tr valign="top">
48+
<td>M</td>
49+
50+
<td>the month as number without a leading zero (1-12)</td>
51+
</tr>
52+
53+
<tr valign="top">
54+
<td>MM</td>
55+
56+
<td>the month as number with a leading zero (01-12)</td>
57+
</tr>
58+
59+
<tr valign="top">
60+
<td>MMM</td>
61+
62+
<td>the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses <a href=
63+
"qdate.html#shortMonthName">QDate::shortMonthName</a>().</td>
64+
</tr>
65+
66+
<tr valign="top">
67+
<td>MMMM</td>
68+
69+
<td>the long localized month name (e.g. 'January' to 'December'). Uses <a href=
70+
"qdate.html#longMonthName">QDate::longMonthName</a>().</td>
71+
</tr>
72+
73+
<tr valign="top">
74+
<td>yy</td>
75+
76+
<td>the year as two digit number (00-99)</td>
77+
</tr>
78+
79+
<tr valign="top">
80+
<td>yyyy</td>
81+
82+
<td>the year as four digit number</td>
83+
</tr>
84+
</table>
85+
86+
<p>These expressions may be used for the time part of the format string:</p>
87+
88+
<table>
89+
<thead>
90+
<tr>
91+
<th>Expression</th>
92+
93+
<th>Output</th>
94+
</tr>
95+
</thead>
96+
97+
<tr valign="top">
98+
<td>h</td>
99+
100+
<td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td>
101+
</tr>
102+
103+
<tr valign="top">
104+
<td>hh</td>
105+
106+
<td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td>
107+
</tr>
108+
109+
<tr valign="top">
110+
<td>H</td>
111+
112+
<td>the hour without a leading zero (0 to 23, even with AM/PM display)</td>
113+
</tr>
114+
115+
<tr valign="top">
116+
<td>HH</td>
117+
118+
<td>the hour with a leading zero (00 to 23, even with AM/PM display)</td>
119+
</tr>
120+
121+
<tr valign="top">
122+
<td>m</td>
123+
124+
<td>the minute without a leading zero (0 to 59)</td>
125+
</tr>
126+
127+
<tr valign="top">
128+
<td>mm</td>
129+
130+
<td>the minute with a leading zero (00 to 59)</td>
131+
</tr>
132+
133+
<tr valign="top">
134+
<td>s</td>
135+
136+
<td>the second without a leading zero (0 to 59)</td>
137+
</tr>
138+
139+
<tr valign="top">
140+
<td>ss</td>
141+
142+
<td>the second with a leading zero (00 to 59)</td>
143+
</tr>
144+
145+
<tr valign="top">
146+
<td>z</td>
147+
148+
<td>the milliseconds without leading zeroes (0 to 999)</td>
149+
</tr>
150+
151+
<tr valign="top">
152+
<td>zzz</td>
153+
154+
<td>the milliseconds with leading zeroes (000 to 999)</td>
155+
</tr>
156+
157+
<tr valign="top">
158+
<td>AP or A</td>
159+
160+
<td>interpret as an AM/PM time. <i>AP</i> must be either "AM" or "PM".</td>
161+
</tr>
162+
163+
<tr valign="top">
164+
<td>ap or a</td>
165+
166+
<td>Interpret as an AM/PM time. <i>ap</i> must be either "am" or "pm".</td>
167+
</tr>
168+
</table>
169+
170+
<br>
171+
172+
<h4>Example</h4>
173+
<!-- Show example of function.-->
174+
<code>format_date('2012-05-15','dd.mm.yyyy') &rarr; 15.00.2012</code><br>

resources/function_help/todate-en_US

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<h3>todate() function</h3>
2+
Convert a string into Qt data type.
3+
4+
<h4>Syntax</h4>
5+
<code>todate('string')</code><br>
6+
7+
<h4>Arguments</h4>
8+
<code>string</code> - is string in Qt date format.
9+
<br>
10+
11+
<h4>Example</h4>
12+
<!-- Show example of function.-->
13+
<code>todate('2012-05-04') &rarr; 2012-05-04</code><br>
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<h3>todatetime() function</h3>
2+
Convert a string into Qt data time type.
3+
4+
<h4>Syntax</h4>
5+
<code>todatetime('string')</code><br>
6+
7+
<h4>Arguments</h4>
8+
<code>string</code> - is string in Qt date time format.
9+
<br>
10+
11+
<h4>Example</h4>
12+
<!-- Show example of function.-->
13+
<code>todatetime('2012-05-04 12:50:00') &rarr; 2012-05-04T12:50:00</code><br>
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<h3>tointerval() function</h3>
2+
Converts a string to a interval type. Can be used to take days, hours, month, etc off a date.
3+
4+
<h4>Syntax</h4>
5+
<code>tointerval('string')</code><br>
6+
7+
<h4>Arguments</h4>
8+
<code>string</code> - is string. Format {n} days {n} hours {n} months
9+
<br>
10+
11+
<h4>Example</h4>
12+
<!-- Show example of function.-->
13+
<code>todatetime('2012-05-05 12:00:00') - tointerval('1 day 2 hours') &rarr; 2012-05-04T10:00:00</code><br>

resources/function_help/totime-en_US

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<h3>totime() function</h3>
2+
Convert a string into Qt time type.
3+
4+
<h4>Syntax</h4>
5+
<code>totime('string')</code><br>
6+
7+
<h4>Arguments</h4>
8+
<code>string</code> - is string in Qt time format.
9+
<br>
10+
11+
<h4>Example</h4>
12+
<!-- Show example of function.-->
13+
<code>totime('12:30:01') &rarr; 12:30:01</code><br>

0 commit comments

Comments
 (0)