~ubuntu-branches/ubuntu/natty/evolution-data-server/natty

« back to all changes in this revision

Viewing changes to docs/reference/libedataserver/html/libedataserver-e-time-utils.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Time-Related Utility Functions</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
7
<link rel="home" href="index.html" title="Evolution-Data-Server Manual: Utilities (libedataserver)">
8
8
<link rel="up" href="ch01.html" title="Evolution-Data-Server Manual: Utilities (libedataserver)">
9
9
<link rel="prev" href="ESourceList.html" title="ESourceList">
26
26
                  <a href="#libedataserver-e-time-utils.description" class="shortcut">Description</a>
27
27
</td></tr>
28
28
</table>
29
 
<div class="refentry" lang="en">
 
29
<div class="refentry" title="Time-Related Utility Functions">
30
30
<a name="libedataserver-e-time-utils"></a><div class="titlepage"></div>
31
31
<div class="refnamediv"><table width="100%"><tr>
32
32
<td valign="top">
35
35
</td>
36
36
<td valign="top" align="right"></td>
37
37
</tr></table></div>
38
 
<div class="refsynopsisdiv">
 
38
<div class="refsynopsisdiv" title="Synopsis">
39
39
<a name="libedataserver-e-time-utils.synopsis"></a><h2>Synopsis</h2>
40
40
<pre class="synopsis">enum                <a class="link" href="libedataserver-e-time-utils.html#ETimeParseStatus" title="enum ETimeParseStatus">ETimeParseStatus</a>;
41
41
<a class="link" href="libedataserver-e-time-utils.html#ETimeParseStatus" title="enum ETimeParseStatus"><span class="returnvalue">ETimeParseStatus</span></a>    <a class="link" href="libedataserver-e-time-utils.html#e-time-parse-date-and-time" title="e_time_parse_date_and_time ()">e_time_parse_date_and_time</a>          (<em class="parameter"><code>const <span class="type">gchar</span> *value</code></em>,
68
68
<span class="returnvalue">gchar</span> *             <a class="link" href="libedataserver-e-time-utils.html#e-time-get-d-fmt-with-4digit-year" title="e_time_get_d_fmt_with_4digit_year ()">e_time_get_d_fmt_with_4digit_year</a>   (<em class="parameter"><code><span class="type">void</span></code></em>);
69
69
</pre>
70
70
</div>
71
 
<div class="refsect1" lang="en">
 
71
<div class="refsect1" title="Description">
72
72
<a name="libedataserver-e-time-utils.description"></a><h2>Description</h2>
73
73
<p>
74
74
</p>
75
75
</div>
76
 
<div class="refsect1" lang="en">
 
76
<div class="refsect1" title="Details">
77
77
<a name="libedataserver-e-time-utils.details"></a><h2>Details</h2>
78
 
<div class="refsect2" lang="en">
 
78
<div class="refsect2" title="enum ETimeParseStatus">
79
79
<a name="ETimeParseStatus"></a><h3>enum ETimeParseStatus</h3>
80
80
<pre class="programlisting">typedef enum {
81
81
        E_TIME_PARSE_OK,
105
105
</table></div>
106
106
</div>
107
107
<hr>
108
 
<div class="refsect2" lang="en">
 
108
<div class="refsect2" title="e_time_parse_date_and_time ()">
109
109
<a name="e-time-parse-date-and-time"></a><h3>e_time_parse_date_and_time ()</h3>
110
110
<pre class="programlisting"><a class="link" href="libedataserver-e-time-utils.html#ETimeParseStatus" title="enum ETimeParseStatus"><span class="returnvalue">ETimeParseStatus</span></a>    e_time_parse_date_and_time          (<em class="parameter"><code>const <span class="type">gchar</span> *value</code></em>,
111
111
                                                         <em class="parameter"><code><span class="type">struct tm</span> *result</code></em>);</pre>
133
133
</table></div>
134
134
</div>
135
135
<hr>
136
 
<div class="refsect2" lang="en">
 
136
<div class="refsect2" title="e_time_parse_date ()">
137
137
<a name="e-time-parse-date"></a><h3>e_time_parse_date ()</h3>
138
138
<pre class="programlisting"><a class="link" href="libedataserver-e-time-utils.html#ETimeParseStatus" title="enum ETimeParseStatus"><span class="returnvalue">ETimeParseStatus</span></a>    e_time_parse_date                   (<em class="parameter"><code>const <span class="type">gchar</span> *value</code></em>,
139
139
                                                         <em class="parameter"><code><span class="type">struct tm</span> *result</code></em>);</pre>
161
161
</table></div>
162
162
</div>
163
163
<hr>
164
 
<div class="refsect2" lang="en">
 
164
<div class="refsect2" title="e_time_parse_date_and_time_ex ()">
165
165
<a name="e-time-parse-date-and-time-ex"></a><h3>e_time_parse_date_and_time_ex ()</h3>
166
166
<pre class="programlisting"><a class="link" href="libedataserver-e-time-utils.html#ETimeParseStatus" title="enum ETimeParseStatus"><span class="returnvalue">ETimeParseStatus</span></a>    e_time_parse_date_and_time_ex       (<em class="parameter"><code>const <span class="type">gchar</span> *value</code></em>,
167
167
                                                         <em class="parameter"><code><span class="type">struct tm</span> *result</code></em>,
169
169
<p>
170
170
Parses a string <em class="parameter"><code>value</code></em> containing a date and a time and stores the
171
171
result in <em class="parameter"><code>result</code></em>. The date in <em class="parameter"><code>value</code></em> is expected to be in a format
172
 
like "Wed 3/13/00 14:20:00", though <a href="../camel/camel-camel-i18n.html#gettext"><code class="function">gettext()</code></a> is used to support the
 
172
like "Wed 3/13/00 14:20:00", though <code class="function">gettext()</code> is used to support the
173
173
appropriate local formats. There is also some leniency on the
174
174
format of the string, e.g. the weekday can be skipped or 12-hour
175
 
formats with am/pm can be used.</p>
 
175
formats with am/pm can be used.
 
176
</p>
176
177
<div class="variablelist"><table border="0">
177
178
<col align="left" valign="top">
178
179
<tbody>
197
198
<td> E_TIME_PARSE_OK if the string was successfully parsed,
198
199
         E_TIME_PARSE_NONE if the string was empty, or
199
200
         E_TIME_PARSE_INVALID if the string could not be parsed.
 
201
 
200
202
</td>
201
203
</tr>
202
204
</tbody>
203
205
</table></div>
 
206
<p class="since">Since 2.22</p>
204
207
</div>
205
208
<hr>
206
 
<div class="refsect2" lang="en">
 
209
<div class="refsect2" title="e_time_parse_date_ex ()">
207
210
<a name="e-time-parse-date-ex"></a><h3>e_time_parse_date_ex ()</h3>
208
211
<pre class="programlisting"><a class="link" href="libedataserver-e-time-utils.html#ETimeParseStatus" title="enum ETimeParseStatus"><span class="returnvalue">ETimeParseStatus</span></a>    e_time_parse_date_ex                (<em class="parameter"><code>const <span class="type">gchar</span> *value</code></em>,
209
212
                                                         <em class="parameter"><code><span class="type">struct tm</span> *result</code></em>,
210
213
                                                         <em class="parameter"><code><span class="type">gboolean</span> *two_digit_year</code></em>);</pre>
211
214
<p>
212
215
Takes in a date string entered by the user and tries to convert it to
213
 
a struct <a class="link" href="libedataserver-e-util.html#tm" title="struct tm"><span class="type">tm</span></a>.</p>
 
216
a struct <a class="link" href="libedataserver-e-util.html#tm" title="struct tm"><span class="type">tm</span></a>.
 
217
</p>
214
218
<div class="variablelist"><table border="0">
215
219
<col align="left" valign="top">
216
220
<tbody>
234
238
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
235
239
<td> An <a class="link" href="libedataserver-e-time-utils.html#ETimeParseStatus" title="enum ETimeParseStatus"><span class="type">ETimeParseStatus</span></a> result code indicating whether
236
240
<em class="parameter"><code>value</code></em> was an empty string, a valid date, or an invalid date.
 
241
 
237
242
</td>
238
243
</tr>
239
244
</tbody>
240
245
</table></div>
 
246
<p class="since">Since 2.22</p>
241
247
</div>
242
248
<hr>
243
 
<div class="refsect2" lang="en">
 
249
<div class="refsect2" title="e_time_parse_time ()">
244
250
<a name="e-time-parse-time"></a><h3>e_time_parse_time ()</h3>
245
251
<pre class="programlisting"><a class="link" href="libedataserver-e-time-utils.html#ETimeParseStatus" title="enum ETimeParseStatus"><span class="returnvalue">ETimeParseStatus</span></a>    e_time_parse_time                   (<em class="parameter"><code>const <span class="type">gchar</span> *value</code></em>,
246
252
                                                         <em class="parameter"><code><span class="type">struct tm</span> *result</code></em>);</pre>
247
253
<p>
248
254
Parses <em class="parameter"><code>value</code></em>, a string containing a time. <em class="parameter"><code>value</code></em> is expected to be
249
 
in a format like "14:20:00". <a href="../camel/camel-camel-i18n.html#gettext"><code class="function">gettext()</code></a> is used to
 
255
in a format like "14:20:00". <code class="function">gettext()</code> is used to
250
256
support the appropriate local formats and slightly
251
257
different formats, such as 12-hour formats with am/pm,
252
 
are accepted as well.</p>
 
258
are accepted as well.
 
259
</p>
253
260
<div class="variablelist"><table border="0">
254
261
<col align="left" valign="top">
255
262
<tbody>
273
280
</table></div>
274
281
</div>
275
282
<hr>
276
 
<div class="refsect2" lang="en">
 
283
<div class="refsect2" title="e_time_format_date_and_time ()">
277
284
<a name="e-time-format-date-and-time"></a><h3>e_time_format_date_and_time ()</h3>
278
285
<pre class="programlisting"><span class="returnvalue">void</span>                e_time_format_date_and_time         (<em class="parameter"><code><span class="type">struct tm</span> *date_tm</code></em>,
279
286
                                                         <em class="parameter"><code><span class="type">gboolean</span> use_24_hour_format</code></em>,
287
294
safe. If <em class="parameter"><code>show_midnight</code></em> is <span class="type">FALSE</span>, and the time is midnight, then
288
295
only the date is stored in <em class="parameter"><code>buffer</code></em>. If <em class="parameter"><code>show_zero_seconds</code></em> is
289
296
<span class="type">FALSE</span>, then if the time has zero seconds only the hour and minute
290
 
of the time are stored in <em class="parameter"><code>buffer</code></em>.</p>
 
297
of the time are stored in <em class="parameter"><code>buffer</code></em>.
 
298
</p>
291
299
<div class="variablelist"><table border="0">
292
300
<col align="left" valign="top">
293
301
<tbody>
325
333
</table></div>
326
334
</div>
327
335
<hr>
328
 
<div class="refsect2" lang="en">
 
336
<div class="refsect2" title="e_time_format_time ()">
329
337
<a name="e-time-format-time"></a><h3>e_time_format_time ()</h3>
330
338
<pre class="programlisting"><span class="returnvalue">void</span>                e_time_format_time                  (<em class="parameter"><code><span class="type">struct tm</span> *date_tm</code></em>,
331
339
                                                         <em class="parameter"><code><span class="type">gboolean</span> use_24_hour_format</code></em>,
334
342
                                                         <em class="parameter"><code><span class="type">gint</span> buffer_size</code></em>);</pre>
335
343
<p>
336
344
Creates a string representation of a time value in <em class="parameter"><code>date_tm</code></em> and
337
 
stores it in <em class="parameter"><code>buffer</code></em>. <em class="parameter"><code>buffer_size</code></em> should be at least 64.</p>
 
345
stores it in <em class="parameter"><code>buffer</code></em>. <em class="parameter"><code>buffer_size</code></em> should be at least 64.
 
346
</p>
338
347
<div class="variablelist"><table border="0">
339
348
<col align="left" valign="top">
340
349
<tbody>
367
376
</table></div>
368
377
</div>
369
378
<hr>
370
 
<div class="refsect2" lang="en">
 
379
<div class="refsect2" title="e_mktime_utc ()">
371
380
<a name="e-mktime-utc"></a><h3>e_mktime_utc ()</h3>
372
381
<pre class="programlisting"><span class="returnvalue">time_t</span>              e_mktime_utc                        (<em class="parameter"><code><span class="type">struct tm</span> *tm</code></em>);</pre>
373
382
<p>
374
 
Like mktime(3), but assumes UTC instead of local timezone.</p>
 
383
Like mktime(3), but assumes UTC instead of local timezone.
 
384
</p>
375
385
<div class="variablelist"><table border="0">
376
386
<col align="left" valign="top">
377
387
<tbody>
389
399
</table></div>
390
400
</div>
391
401
<hr>
392
 
<div class="refsect2" lang="en">
 
402
<div class="refsect2" title="e_localtime_with_offset ()">
393
403
<a name="e-localtime-with-offset"></a><h3>e_localtime_with_offset ()</h3>
394
404
<pre class="programlisting"><span class="returnvalue">void</span>                e_localtime_with_offset             (<em class="parameter"><code><span class="type">time_t</span> tt</code></em>,
395
405
                                                         <em class="parameter"><code><span class="type">struct tm</span> *tm</code></em>,
397
407
<p>
398
408
Converts the calendar time time representation <em class="parameter"><code>tt</code></em> to a broken-down
399
409
time representation, store in <em class="parameter"><code>tm</code></em>, and provides the offset in
400
 
seconds from UTC time, stored in <em class="parameter"><code>offset</code></em>.</p>
 
410
seconds from UTC time, stored in <em class="parameter"><code>offset</code></em>.
 
411
</p>
401
412
<div class="variablelist"><table border="0">
402
413
<col align="left" valign="top">
403
414
<tbody>
420
431
</table></div>
421
432
</div>
422
433
<hr>
423
 
<div class="refsect2" lang="en">
 
434
<div class="refsect2" title="e_time_get_d_fmt_with_4digit_year ()">
424
435
<a name="e-time-get-d-fmt-with-4digit-year"></a><h3>e_time_get_d_fmt_with_4digit_year ()</h3>
425
436
<pre class="programlisting"><span class="returnvalue">gchar</span> *             e_time_get_d_fmt_with_4digit_year   (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
426
 
<p>
427
 
</p>
428
437
<div class="variablelist"><table border="0">
429
438
<col align="left" valign="top">
430
439
<tbody><tr>
433
442
</td>
434
443
</tr></tbody>
435
444
</table></div>
 
445
<p class="since">Since 2.22</p>
436
446
</div>
437
447
</div>
438
448
</div>