Imported Upstream version 1.57.0
[platform/upstream/boost.git] / doc / html / boost / date_time / first_kday_before.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Class template first_kday_before</title>
5 <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
8 <link rel="up" href="../../date_time/doxy.html#header.boost.date_time.date_generators_hpp" title="Header &lt;boost/date_time/date_generators.hpp&gt;">
9 <link rel="prev" href="first_kday_after.html" title="Class template first_kday_after">
10 <link rel="next" href="days_until_weekday.html" title="Function template days_until_weekday">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
15 <td align="center"><a href="../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="first_kday_after.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../date_time/doxy.html#header.boost.date_time.date_generators_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="days_until_weekday.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="boost.date_time.first_kday_before"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Class template first_kday_before</span></h2>
29 <p>boost::date_time::first_kday_before &#8212; Calculate something like "First Sunday before Jan 1,2002. </p>
30 </div>
31 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../date_time/doxy.html#header.boost.date_time.date_generators_hpp" title="Header &lt;boost/date_time/date_generators.hpp&gt;">boost/date_time/date_generators.hpp</a>&gt;
33
34 </span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> date_type<span class="special">&gt;</span> 
35 <span class="keyword">class</span> <a class="link" href="first_kday_before.html" title="Class template first_kday_before">first_kday_before</a> <span class="special">{</span>
36 <span class="keyword">public</span><span class="special">:</span>
37   <span class="comment">// types</span>
38   <span class="keyword">typedef</span> <span class="identifier">date_type</span><span class="special">::</span><span class="identifier">calendar_type</span>        <a name="boost.date_time.first_kday_before.calendar_type"></a><span class="identifier">calendar_type</span><span class="special">;</span>   
39   <span class="keyword">typedef</span> <span class="identifier">calendar_type</span><span class="special">::</span><span class="identifier">day_of_week_type</span> <a name="boost.date_time.first_kday_before.day_of_week_type"></a><span class="identifier">day_of_week_type</span><span class="special">;</span>
40   <span class="keyword">typedef</span> <span class="identifier">date_type</span><span class="special">::</span><span class="identifier">duration_type</span>        <a name="boost.date_time.first_kday_before.duration_type"></a><span class="identifier">duration_type</span><span class="special">;</span>   
41
42   <span class="comment">// <a class="link" href="first_kday_before.html#boost.date_time.first_kday_beforeconstruct-copy-destruct">construct/copy/destruct</a></span>
43   <a class="link" href="first_kday_before.html#idp107252624-bb"><span class="identifier">first_kday_before</span></a><span class="special">(</span><span class="identifier">day_of_week_type</span><span class="special">)</span><span class="special">;</span>
44
45   <span class="comment">// <a class="link" href="first_kday_before.html#idp96614688-bb">public member functions</a></span>
46   <span class="identifier">date_type</span> <a class="link" href="first_kday_before.html#idp96615248-bb"><span class="identifier">get_date</span></a><span class="special">(</span><span class="identifier">date_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
47   <span class="identifier">day_of_week_type</span> <a class="link" href="first_kday_before.html#idp54820960-bb"><span class="identifier">day_of_week</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
48 <span class="special">}</span><span class="special">;</span></pre></div>
49 <div class="refsect1">
50 <a name="idp187766592"></a><h2>Description</h2>
51 <p>Date generator that takes a date and finds kday after </p>
52 <pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="first_kday_before.html" title="Class template first_kday_before">boost::date_time::first_kday_before&lt;date&gt;</a> <span class="identifier">firstkdaybefore</span><span class="special">;</span>
53 <span class="identifier">firstkdaybefore</span> <span class="identifier">fkbf</span><span class="special">(</span><span class="identifier">Monday</span><span class="special">)</span><span class="special">;</span>
54 <span class="identifier">fkbf</span><span class="special">.</span><span class="identifier">get_date</span><span class="special">(</span><span class="identifier">date</span><span class="special">(</span><span class="number">2002</span><span class="special">,</span><span class="identifier">Feb</span><span class="special">,</span><span class="number">1</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
55 </pre>
56 <p> </p>
57 <div class="refsect2">
58 <a name="idp187781872"></a><h3>
59 <a name="boost.date_time.first_kday_beforeconstruct-copy-destruct"></a><code class="computeroutput">first_kday_before</code> 
60         public
61        construct/copy/destruct</h3>
62 <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><pre class="literallayout"><a name="idp107252624-bb"></a><span class="identifier">first_kday_before</span><span class="special">(</span><span class="identifier">day_of_week_type</span> dow<span class="special">)</span><span class="special">;</span></pre></li></ol></div>
63 </div>
64 <div class="refsect2">
65 <a name="idp187788640"></a><h3>
66 <a name="idp96614688-bb"></a><code class="computeroutput">first_kday_before</code> public member functions</h3>
67 <div class="orderedlist"><ol class="orderedlist" type="1">
68 <li class="listitem">
69 <pre class="literallayout"><span class="identifier">date_type</span> <a name="idp96615248-bb"></a><span class="identifier">get_date</span><span class="special">(</span><span class="identifier">date_type</span> start_day<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Return next kday given. </li>
70 <li class="listitem"><pre class="literallayout"><span class="identifier">day_of_week_type</span> <a name="idp54820960-bb"></a><span class="identifier">day_of_week</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
71 </ol></div>
72 </div>
73 </div>
74 </div>
75 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
76 <td align="left"></td>
77 <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2005 CrystalClear Software, Inc<p>Subject to the Boost Software License, Version 1.0. (See accompanying file
78     <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p>
79 </div></td>
80 </tr></table>
81 <hr>
82 <div class="spirit-nav">
83 <a accesskey="p" href="first_kday_after.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../date_time/doxy.html#header.boost.date_time.date_generators_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="days_until_weekday.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
84 </div>
85 </body>
86 </html>