Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 6233d9843498773eadbb27fa7ac1e51f > files > 25

ocaml-calendar-devel-2.01.1-5.fc13.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="Calendar_sig.S.Time.html">
<link rel="Up" href="Calendar_sig.S.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="Arithmetic operations" rel="Section" href="#3_Arithmeticoperations">
<link title="Constructors" rel="Section" href="#3_Constructors">
<link title="Coercions" rel="Section" href="#3_Coercions">
<title>Calendar_sig.S.Period</title>
</head>
<body>
<div class="navbar"><a href="Calendar_sig.S.Time.html">Previous</a>
&nbsp;<a href="Calendar_sig.S.html">Up</a>
&nbsp;</div>
<center><h1>Module <a href="type_Calendar_sig.S.Period.html">Calendar_sig.S.Period</a></h1></center>
<br>
<pre><span class="keyword">module</span> Period: <code class="code"><span class="keyword">sig</span></code> <a href="Calendar_sig.S.Period.html">..</a> <code class="code"><span class="keyword">end</span></code></pre>A period is the number of seconds between two calendars.<br>
<hr width="100%">
<br>
<a name="3_Arithmeticoperations"></a>
<h3>Arithmetic operations</h3><br>
<pre><span class="keyword">include</span> <a href="Period.S.html">Period.S</a></pre>
<br>
<a name="3_Constructors"></a>
<h3>Constructors</h3><br>
<pre><span class="keyword">val</span> <a name="VALmake"></a>make : <code class="type">int -> int -> int -> int -> int -> <a href="Calendar_sig.S.html#TYPEsecond">Calendar_sig.S.second</a> -> <a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a></code></pre><div class="info">
<code class="code">make year month day hour minute second</code> makes a period of the 
	  specified length.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALlmake"></a>lmake : <code class="type">?year:int -><br>       ?month:int -><br>       ?day:int -><br>       ?hour:int -><br>       ?minute:int -> ?second:<a href="Calendar_sig.S.html#TYPEsecond">Calendar_sig.S.second</a> -> unit -> <a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a></code></pre><div class="info">
Labelled version of <code class="code">make</code>. 
	  The default value of each argument is <code class="code">0</code>.<br>
</div>
<br>
Those functions have the same behavious as those defined in
	<a href="Date_sig.S.Period.html"><code class="code"><span class="constructor">Date_sig</span>.<span class="constructor">S</span>.<span class="constructor">Period</span></code></a>.<br>
<pre><span class="keyword">val</span> <a name="VALyear"></a>year : <code class="type">int -> <a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a></code></pre><div class="info">
<b>See also</b> <a href="Date_sig.S.Period.html#VALyear">Date_sig.S.Period.year</a><br>
</div>
<pre><span class="keyword">val</span> <a name="VALmonth"></a>month : <code class="type">int -> <a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a></code></pre><div class="info">
<b>See also</b> <a href="Date_sig.S.Period.html#VALmonth">Date_sig.S.Period.month</a><br>
</div>
<pre><span class="keyword">val</span> <a name="VALweek"></a>week : <code class="type">int -> <a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a></code></pre><div class="info">
<b>See also</b> <a href="Date_sig.S.Period.html#VALweek">Date_sig.S.Period.week</a><br>
</div>
<pre><span class="keyword">val</span> <a name="VALday"></a>day : <code class="type">int -> <a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a></code></pre><div class="info">
<b>See also</b> <a href="Date_sig.S.Period.html#VALday">Date_sig.S.Period.day</a><br>
</div>
<br>
Those functions have the same behavious as those defined in
	.<br>
<pre><span class="keyword">val</span> <a name="VALhour"></a>hour : <code class="type">int -> <a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a></code></pre><div class="info">
<b>See also</b> <a href="Time_sig.S.Period.html#VALhour">Time_sig.S.Period.hour</a><br>
</div>
<pre><span class="keyword">val</span> <a name="VALminute"></a>minute : <code class="type">int -> <a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a></code></pre><div class="info">
<b>See also</b> <a href="Time_sig.S.Period.html#VALminute">Time_sig.S.Period.minute</a><br>
</div>
<pre><span class="keyword">val</span> <a name="VALsecond"></a>second : <code class="type"><a href="Calendar_sig.S.html#TYPEsecond">Calendar_sig.S.second</a> -> <a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a></code></pre><div class="info">
<b>See also</b> <a href="Time_sig.S.Period.html#VALsecond">Time_sig.S.Period.second</a><br>
</div>
<br>
<a name="3_Coercions"></a>
<h3>Coercions</h3><br>
<pre><span class="keyword">val</span> <a name="VALfrom_date"></a>from_date : <code class="type">Date.Period.t -> <a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a></code></pre><div class="info">
Convert a date period to a calendar period.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfrom_time"></a>from_time : <code class="type">Time.Period.t -> <a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a></code></pre><div class="info">
Convert a time period to a calendar period.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALto_date"></a>to_date : <code class="type"><a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a> -> Date.Period.t</code></pre><div class="info">
Convert a calendar period to a date period. 
	  The fractional time period is ignored.<br>
<b>Example:</b> <code class="code">to_date (hour 60)</code> is equivalent to <code class="code"><span class="constructor">Date</span>.<span class="constructor">Period</span>.days 2</code>.<br>
</div>
<pre><span class="keyword">exception</span> <a name="EXCEPTIONNot_computable"></a>Not_computable</pre>
<div class="info">
<code class="code">= <span class="constructor">Date</span>.<span class="constructor">Period</span>.<span class="constructor">Not_computable</span></code>.<br>
<b>Since</b> 1.04<br>
</div>
<pre><span class="keyword">val</span> <a name="VALto_time"></a>to_time : <code class="type"><a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a> -> Time.Period.t</code></pre><div class="info">
Convert a calendar period to a date period.<br>
<b>Since</b> 1.04<br>
<b>Raises</b> <code>Not_computable</code> if the time period is not computable.<br>
<b>Examples:</b><ul><li><code class="code">to_time (year 1)</code> raises <code class="code"><span class="constructor">Not_computable</span></code> because
	  a year is not a constant number of days.<br>
</li><li><code class="code">to_time (second 30)</code> returns a time period of <code class="code">30</code> seconds<br>
</li><li><code class="code">to_time (day 6)</code> returns a time period of <code class="code">24 * 3600 * 6 =
	  518400</code> seconds<br>
</li></ul></div>
<pre><span class="keyword">val</span> <a name="VALymds"></a>ymds : <code class="type"><a href="Calendar_sig.S.html#TYPEt">Calendar_sig.S.t</a> -> int * int * int * <a href="Calendar_sig.S.html#TYPEsecond">Calendar_sig.S.second</a></code></pre><div class="info">
Number of years, months, days and seconds in a period.<br>
<b>Since</b> 1.09.0<br>
<b>Examples:</b><ul><li><code class="code">ymds (make (-1) (-2) (-3) (-1) (-2) (-3)</code> returns
	  <code class="code">-1, -2, -4, 82677</code>.<br>
</li><li><code class="code">ymds (make 1 2 3 1 2 3)</code> returns <code class="code">1, 2, 3, 3723</code><br>
</li></ul></div>
</body></html>