File: Printer.TimePrinter.html

package info (click to toggle)
calendar 1.09.3-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 916 kB
  • ctags: 685
  • sloc: ml: 1,336; makefile: 140; sh: 14
file content (80 lines) | stat: -rw-r--r-- 5,059 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="Start" href="index.html">
<link rel="previous" href="Printer.DatePrinter.html">
<link rel="next" href="Printer.CalendarPrinter.html">
<link rel="Up" href="Printer.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Time_Zone" rel="Chapter" href="Time_Zone.html">
<link title="Period" rel="Chapter" href="Period.html">
<link title="Time" rel="Chapter" href="Time.html">
<link title="Date" rel="Chapter" href="Date.html">
<link title="Calendar" rel="Chapter" href="Calendar.html">
<link title="Printer" rel="Chapter" href="Printer.html"><title>Printer.TimePrinter</title>
</head>
<body>
<div class="navbar"><a href="Printer.DatePrinter.html">Previous</a>
&nbsp;<a href="Printer.html">Up</a>
&nbsp;<a href="Printer.CalendarPrinter.html">Next</a>
</div>
<center><h1>Module <a href="type_Printer.TimePrinter.html">Printer.TimePrinter</a></h1></center>
<br>
<pre><span class="keyword">module</span> TimePrinter: <code class="type"><a href="Printer.S.html">S</a></code><code class="type">  with type t = Time.t</code></pre>Time printer.
  The specifications which use date functionalities are not available 
  on this printer.
<p>

  The default format is <code class="code">%T</code>.<br>
<hr width="100%">
<br>
Generic signature of a printer.<br>
<pre><span class="keyword">type</span> <a name="TYPEt"></a><code class="type"></code>t </pre>
<div class="info">
Generic type of a printer.<br>
</div>

<pre><span class="keyword">val</span> <a name="VALfprint"></a>fprint : <code class="type">string -> Format.formatter -> <a href="Printer.S.html#TYPEt">t</a> -> unit</code></pre><div class="info">
<code class="code">fprint format formatter x</code> outputs <code class="code">x</code> on <code class="code">formatter</code> according to
      the specified <code class="code">format</code>. Raise <code class="code">Invalid_argument</code> if the format is 
      incorrect.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALprint"></a>print : <code class="type">string -> <a href="Printer.S.html#TYPEt">t</a> -> unit</code></pre><div class="info">
<code class="code">print format</code> is equivalent to <code class="code">fprint format Format.std_formatter</code><br>
</div>
<pre><span class="keyword">val</span> <a name="VALdprint"></a>dprint : <code class="type"><a href="Printer.S.html#TYPEt">t</a> -> unit</code></pre><div class="info">
Same as <code class="code">print d</code> where <code class="code">d</code> is the default format 
      (see the printer implementations).<br>
</div>
<pre><span class="keyword">val</span> <a name="VALsprint"></a>sprint : <code class="type">string -> <a href="Printer.S.html#TYPEt">t</a> -> string</code></pre><div class="info">
<code class="code">sprint format date</code> converts <code class="code">date</code> to a string according to <code class="code">format</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALto_string"></a>to_string : <code class="type"><a href="Printer.S.html#TYPEt">t</a> -> string</code></pre><div class="info">
Same as <code class="code">sprint d</code> where <code class="code">d</code> is the default format
      (see the printer implementations).<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfrom_fstring"></a>from_fstring : <code class="type">string -> string -> <a href="Printer.S.html#TYPEt">t</a></code></pre><div class="info">
<code class="code">from_fstring format s</code> converts <code class="code">s</code> to a date according to <code class="code">format</code>.
    The only available specifications are <code class="code">%%</code>, <code class="code">%d</code>, <code class="code">%D</code>, <code class="code">%m</code>, <code class="code">%M</code>, <code class="code">%S</code>,
    <code class="code">%T</code>, <code class="code">%y</code> and <code class="code">%Y</code>.
    When the format has only two digits for the year number, 1900 are added
    to this number (see the example).
<p>

    Raise <code class="code">Invalid_argument</code> if either the format is incorrect 
    or the string does not match the format
    or the event cannot be created (e.g. if you do not specify a year for
    a date).
<p>

    For example <code class="code">from_fstring "the date is %D" "the date is 01/06/03"</code> returns
    a date equivalent to <code class="code">Date.make 1903 1 6</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfrom_string"></a>from_string : <code class="type">string -> <a href="Printer.S.html#TYPEt">t</a></code></pre><div class="info">
Same as <code class="code">from_fstring d</code> where <code class="code">d</code> is the default format.<br>
</div>
</body></html>