Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > b2fe8e829c5356a97d67372f270fcd41 > files > 44

ocaml-calendar-devel-2.03.2-2.fc18.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Printer.TimePrinter.html">
<link rel="next" href="Printer.Precise_Calendar.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="Utils" rel="Chapter" href="Utils.html">
<link title="Time_Zone" rel="Chapter" href="Time_Zone.html">
<link title="Period" rel="Chapter" href="Period.html">
<link title="Time_sig" rel="Chapter" href="Time_sig.html">
<link title="Time" rel="Chapter" href="Time.html">
<link title="Ftime" rel="Chapter" href="Ftime.html">
<link title="Date_sig" rel="Chapter" href="Date_sig.html">
<link title="Date" rel="Chapter" href="Date.html">
<link title="Calendar_sig" rel="Chapter" href="Calendar_sig.html">
<link title="Calendar_builder" rel="Chapter" href="Calendar_builder.html">
<link title="Calendar" rel="Chapter" href="Calendar.html">
<link title="Fcalendar" rel="Chapter" href="Fcalendar.html">
<link title="Printer" rel="Chapter" href="Printer.html">
<link title="Version" rel="Chapter" href="Version.html"><link title="Parsers from string" rel="Section" href="#3_Parsersfromstring">
<title>Printer.Ftime</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Printer.TimePrinter.html" title="Printer.TimePrinter">Previous</a>
&nbsp;<a class="up" href="Printer.html" title="Printer">Up</a>
&nbsp;<a class="post" href="Printer.Precise_Calendar.html" title="Printer.Precise_Calendar">Next</a>
</div>
<h1>Module <a href="type_Printer.Ftime.html">Printer.Ftime</a></h1>
<pre><span class="keyword">module</span> Ftime: <code class="type"><a href="Printer.S.html">S</a></code><code class="type">  with type t = Ftime.t</code></pre><div class="info">
Ftime printer. Seconds are rounded to integers before pretty printing.
    Specifiers which use date functionalities are not available
    on this printer.
    Default format is <code class="code">%<span class="constructor">T</span></code>.<br>
<b>Since</b> 2.0<br>
</div>
<hr width="100%">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
<div class="info">
Generic type of a printer.<br>
</div>

<pre><span id="VALfprint"><span class="keyword">val</span> fprint</span> : <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>.<br>
<b>Raises</b> <code>Invalid_argument</code> if the format is incorrect.<br>
</div>
<pre><span id="VALprint"><span class="keyword">val</span> print</span> : <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 <span class="constructor">Format</span>.std_formatter</code><br>
</div>
<pre><span id="VALdprint"><span class="keyword">val</span> dprint</span> : <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 id="VALsprint"><span class="keyword">val</span> sprint</span> : <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 id="VALto_string"><span class="keyword">val</span> to_string</span> : <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>
<br>
<h3 id="3_Parsersfromstring">Parsers from string</h3><br>
<pre><span id="VALfrom_fstring"><span class="keyword">val</span> from_fstring</span> : <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>.
<p>

      Date padding (i.e. a special directive following <code class="code"><span class="string">'%'</span></code>) and
      specifiers <code class="code">%e</code>, <code class="code">%k</code> and <code class="code">%l</code> are not recognized. Specifiers
      <code class="code">%a</code>, <code class="code">%<span class="constructor">A</span></code>, <code class="code">%j</code>, <code class="code">%v</code>, <code class="code">%w</code> and <code class="code">%<span class="constructor">W</span></code> are recognized but mainly ignored:
      only the validity of the format is checked.
<p>

      In order to recognize words (used by <code class="code">%a</code>, <code class="code">%<span class="constructor">A</span></code>, <code class="code">%b</code>, <code class="code">%<span class="constructor">B</span></code> and <code class="code">%p</code>), a
      regular expression is used which can be configured by
      <a href="Printer.html#VALset_word_regexp"><code class="code"><span class="constructor">Printer</span>.set_word_regexp</code></a>. When the format has only two digits for the
      year number, 1900 are added to this number (see examples).<br>
<b>Raises</b> <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).<br>
<b>Examples:</b><ul><li><code class="code">from_fstring <span class="string">"the date is %B, the %dth %Y"</span> <span class="string">"the date is May,
      the 14th 2007"</span></code> returns a date equivalent to <code class="code"><span class="constructor">Date</span>.make 2007 5 14</code> (with
      default internationalization).<br>
</li><li><code class="code">from_fstring <span class="string">"the date is %D"</span> <span class="string">"the date is 01/06/03"</span></code>
      returns a date equivalent to <code class="code"><span class="constructor">Date</span>.make 1903 1 6</code><br>
</li></ul></div>
<pre><span id="VALfrom_string"><span class="keyword">val</span> from_string</span> : <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>