| 1 | <html> |
|---|
| 2 | <head> |
|---|
| 3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
|---|
| 4 | <title>Class template first_kday_of_month</title> |
|---|
| 5 | <link rel="stylesheet" href="boostbook.css" type="text/css"> |
|---|
| 6 | <meta name="generator" content="DocBook XSL Stylesheets V1.69.1"> |
|---|
| 7 | <link rel="start" href="index.html" title="The Boost C++ Libraries"> |
|---|
| 8 | <link rel="up" href="date_time/doxy.html#id2508942" title="Header <boost/date_time/date_generators.hpp>"> |
|---|
| 9 | <link rel="prev" href="nth_kday_of_month.html" title="Class template nth_kday_of_month"> |
|---|
| 10 | <link rel="next" href="last_kday_of_month.html" title="Class template last_kday_of_month"> |
|---|
| 11 | </head> |
|---|
| 12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
|---|
| 13 | <table cellpadding="2" width="100%"> |
|---|
| 14 | <td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td> |
|---|
| 15 | <td align="center"><a href="../../index.htm">Home</a></td> |
|---|
| 16 | <td align="center"><a href="../../libs/libraries.htm">Libraries</a></td> |
|---|
| 17 | <td align="center"><a href="../../people/people.htm">People</a></td> |
|---|
| 18 | <td align="center"><a href="../../more/faq.htm">FAQ</a></td> |
|---|
| 19 | <td align="center"><a href="../../more/index.htm">More</a></td> |
|---|
| 20 | </table> |
|---|
| 21 | <hr> |
|---|
| 22 | <div class="spirit-nav"> |
|---|
| 23 | <a accesskey="p" href="nth_kday_of_month.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id2508942"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="last_kday_of_month.html"><img src="images/next.png" alt="Next"></a> |
|---|
| 24 | </div> |
|---|
| 25 | <div class="refentry" lang="en"> |
|---|
| 26 | <a name="first_kday_of_month"></a><div class="titlepage"></div> |
|---|
| 27 | <div class="refnamediv"> |
|---|
| 28 | <h2><span class="refentrytitle">Class template first_kday_of_month</span></h2> |
|---|
| 29 | <p>boost::date_time::first_kday_of_month — Useful generator functor for finding holidays and daylight savings. </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="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> date_type> |
|---|
| 33 | <span class="bold"><strong>class</strong></span> first_kday_of_month |
|---|
| 34 | : : <span class="bold"><strong>public</strong></span> boost::date_time::year_based_generator< date_type > |
|---|
| 35 | { |
|---|
| 36 | <span class="bold"><strong>public</strong></span>: |
|---|
| 37 | <span class="emphasis"><em>// types</em></span> |
|---|
| 38 | <span class="bold"><strong>typedef</strong></span> date_type::calendar_type calendar_type; |
|---|
| 39 | <span class="bold"><strong>typedef</strong></span> calendar_type::day_of_week_type day_of_week_type; |
|---|
| 40 | <span class="bold"><strong>typedef</strong></span> calendar_type::month_type month_type; |
|---|
| 41 | <span class="bold"><strong>typedef</strong></span> calendar_type::year_type year_type; |
|---|
| 42 | <span class="bold"><strong>typedef</strong></span> date_type::duration_type duration_type; |
|---|
| 43 | |
|---|
| 44 | <span class="emphasis"><em>// <a href="first_kday_of_month.html#first_kday_of_monthconstruct-copy-destruct">construct/copy/destruct</a></em></span> |
|---|
| 45 | <a href="first_kday_of_month.html#id2503777-bb">first_kday_of_month</a>(day_of_week_type, month_type); |
|---|
| 46 | |
|---|
| 47 | <span class="emphasis"><em>// <a href="first_kday_of_month.html#id2411362-bb">public member functions</a></em></span> |
|---|
| 48 | <span class="type">date_type</span> <a href="first_kday_of_month.html#id2411366-bb">get_date</a>(year_type) <span class="bold"><strong>const</strong></span>; |
|---|
| 49 | <span class="type">month_type</span> <a href="first_kday_of_month.html#id2493298-bb">month</a>() <span class="bold"><strong>const</strong></span>; |
|---|
| 50 | <span class="type">day_of_week_type</span> <a href="first_kday_of_month.html#id2425568-bb">day_of_week</a>() <span class="bold"><strong>const</strong></span>; |
|---|
| 51 | <span class="type"><span class="bold"><strong>virtual</strong></span> std::string</span> <a href="first_kday_of_month.html#id2500238-bb">to_string</a>() <span class="bold"><strong>const</strong></span>; |
|---|
| 52 | };</pre></div> |
|---|
| 53 | <div class="refsect1" lang="en"> |
|---|
| 54 | <a name="id2625623"></a><h2>Description</h2> |
|---|
| 55 | <p>Similar to nth_kday_of_month, but requires less paramters </p> |
|---|
| 56 | <div class="refsect2" lang="en"> |
|---|
| 57 | <a name="id2625630"></a><h3> |
|---|
| 58 | <a name="first_kday_of_monthconstruct-copy-destruct"></a><code class="computeroutput">first_kday_of_month</code> construct/copy/destruct</h3> |
|---|
| 59 | <div class="orderedlist"><ol type="1"><li> |
|---|
| 60 | <pre class="literallayout"><a name="id2503777-bb"></a>first_kday_of_month(day_of_week_type dow, month_type m);</pre> |
|---|
| 61 | <p></p> |
|---|
| 62 | <div class="variablelist"> |
|---|
| 63 | <p class="title"><b>Parameters</b></p> |
|---|
| 64 | <dl> |
|---|
| 65 | <dt><span class="term">dow</span></dt> |
|---|
| 66 | <dd><p>The day of week, eg: Sunday, Monday, etc </p></dd> |
|---|
| 67 | <dt><span class="term">m</span></dt> |
|---|
| 68 | <dd><p>The month of the year, eg: Jan, Feb, Mar, etc </p></dd> |
|---|
| 69 | </dl> |
|---|
| 70 | </div> |
|---|
| 71 | </li></ol></div> |
|---|
| 72 | </div> |
|---|
| 73 | <div class="refsect2" lang="en"> |
|---|
| 74 | <a name="id2625685"></a><h3> |
|---|
| 75 | <a name="id2411362-bb"></a><code class="computeroutput">first_kday_of_month</code> public member functions</h3> |
|---|
| 76 | <div class="orderedlist"><ol type="1"> |
|---|
| 77 | <li><pre class="literallayout"><span class="type">date_type</span> <a name="id2411366-bb"></a>get_date(year_type year) <span class="bold"><strong>const</strong></span>;</pre></li> |
|---|
| 78 | <li><pre class="literallayout"><span class="type">month_type</span> <a name="id2493298-bb"></a>month() <span class="bold"><strong>const</strong></span>;</pre></li> |
|---|
| 79 | <li><pre class="literallayout"><span class="type">day_of_week_type</span> <a name="id2425568-bb"></a>day_of_week() <span class="bold"><strong>const</strong></span>;</pre></li> |
|---|
| 80 | <li> |
|---|
| 81 | <pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> std::string</span> <a name="id2500238-bb"></a>to_string() <span class="bold"><strong>const</strong></span>;</pre> |
|---|
| 82 | <p>Returns a string formatted as "M4.1.0" ==> 1st Sunday in April. </p> |
|---|
| 83 | </li> |
|---|
| 84 | </ol></div> |
|---|
| 85 | </div> |
|---|
| 86 | </div> |
|---|
| 87 | </div> |
|---|
| 88 | <table width="100%"><tr> |
|---|
| 89 | <td align="left"></td> |
|---|
| 90 | <td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td> |
|---|
| 91 | </tr></table> |
|---|
| 92 | <hr> |
|---|
| 93 | <div class="spirit-nav"> |
|---|
| 94 | <a accesskey="p" href="nth_kday_of_month.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id2508942"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="last_kday_of_month.html"><img src="images/next.png" alt="Next"></a> |
|---|
| 95 | </div> |
|---|
| 96 | </body> |
|---|
| 97 | </html> |
|---|