       0        0
     5ˆÏÎÒ568Í¿Ð 8    5‹      Õ–ÛŽÚ0†ï÷)\_ôØ£v“T[‚TTKUUU…LlˆEbGö–>}’
vj«¤\yfòÛ3ßØIì½
GÝé§q�¼›>ÈøÃÛA¿Khàãy œ†åƒ‹f«ÐRBcÄì`³Ù47çMm–0�@Œir�Œ°É‘ÓàÌ+bÁñbÁ¸‰‡ôOD/è­äÂÍÛZàb-#aE
©HµÙVÃÍ%(ÍE«r¯:�é�0”+ºP%ñæšo‹Üí¿šÇ-·`ó]ºÂ4�‡1Y³D.•OQg4ðdº$ÖD>ieaž0µj.å‚– O?÷»£/N³�‘Øˆ…OßtýáÝÈi0d©ð€×<8Í=Ì"I5—)øIñc)~”_O/–šPØÈÈ¥V{)8ÄCÔH'6cŽõÒÄæPUJøÏºÁ¢gÍßOzÃiØŸ”-áÅûêþd×h0fF($¡4"B¬°Ê¯ÕÜfwß]Rmä2FÒ G•¿Aš«•Òuëy“Ù­Šh°‹|QU§Õ¹j´Û�Î5i_ß^ÞrBè^Ô÷ÿ³üµÍm&Ÿq‘°í,µŽæH´†pN�F'4¨Œ"˜\¡LÅŒE(×b¶’ÜmÏ‘`ýÑ
û´Â®1šPÅ‡ï±ª@�‘,2ÌÎ`é×¨üÎ	þâ>�×0·lyÀµsÿ=Î/^< º’y°»øyP^:¿Ë¨Âœ×
       7ˆÏÎÒ595Í¿Ð S    7‹      Õ–moÚ0Çß÷Sx~±wp<�®4dêÒÐ(E”iš¦	™Ø‹ÄŽìŒ}ú9$´£ÓD_ù|ùÇw¿;Ç±÷"¸ëM?�ûäÝôvHÆÞ=B+ ›=€`ZÕZ ?¢„Fˆi`³ÙT7Íª6K˜N Â$n�E#C¬räÔ¿ðrŸA¼H0îFâ¡ÄXøÅÅW¢t†VráÞÛZàb-CasE‰H´Ù–Ãe”æ¢VNÛmHõFŠ](ƒxsÍ·yìú_�ã–Û°ù.\nßÃˆ¬Y,—ªKQ§Ô÷d²$Ö„]
2ÔÊÂ<fjU]Ê%,Æ.ý<èÝ}q:À(Û÷‰ŒXté›^wt}×¨?b‰ð€×Ü:Íõ‡Ì"I4—)ø“âûB|/¿=½`PhaC#S”Zí¥àQCÛ”9ÖWŽ 2‡ªBÂU>(ÆøfÒMƒÁ¤(	Ï—Øg÷']£þ˜¡�Òˆ�³Ä*b¼Ts›^ÿ˜’2i#—RŸ�
9ªüÒL­”Þ¨CXWÈ£˜ÌnUHýÝp˜ä£¬µF»R¯W—¤~ÕiµyBè>Ô÷ÿ3ýµÍl*Ÿq³í,±Žæˆ÷4¸F­SkžœÓ£Ñ1õKãÄþ¼î´Úç‚`2…23¢\‹ÙJr×ž#ÎgØ�G¹ýZn?c4¡òßc•Ž“7býêÜ�,2Ìö`1?ùäkÔÎ¨8ç´úŸñ&Ì,[pí¦ÿçÄ‹”W2v?ŠKçwŒImŽ×
       9ˆÊ�þBÛq¬Ü¤’¸Æ ùÓƒm§ÒÉ¿Ð [    9#ifndef _DATE_TIME_ADJUST_FUNCTORS_HPP___
#define _DATE_TIME_ADJUST_FUNCTORS_HPP___

/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
 * Use, modification and distribution is subject to the
 * Boost Software License, Version 1.0. (See accompanying
 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 * Author: Jeff Garland, Bart Garst
 * $Date$
 */

#include "boost/date_time/date.hpp"
#include "boost/date_time/wrapping_int.hpp"

namespace boost {
namespace date_time {


  //! Functor to iterate a fixed number of days
  template<class date_type>
  class day_functor
  {
  public:
    typedef typename date_type::duration_type duration_type;
    day_functor(int f) : f_(f) {}
    duration_type get_offset(const date_type&) const
    {
      return duration_type(f_);
    }
    duration_type get_neg_offset(const date_type&) const
    {
      return duration_type(-f_);
    }
  private:
    int f_;
  };


  //! Provides calculation to find next nth month given a date
  /*! This adjustment function provides the logic for 'month-based'
   *  advancement on a ymd based calendar.  The policy it uses
   *  to handle the non existant end of month days is to back
   *  up to the last day of the month.  Also, if the starting
   *  date is the last day of a month, this functor will attempt
   *  to adjust to the end of the month.

   */
  template<class date_type>
  class month_functor
  {
  public:
    typedef typename date_type::duration_type duration_type;
    typedef typename date_type::calendar_type cal_type;
    typedef typename cal_type::ymd_type ymd_type;
    typedef typename cal_type::day_type day_type;

    month_functor(int f) : f_(f), origDayOfMonth_(0) {}
    duration_type get_offset(const date_type& d) const
    {
      ymd_type ymd(d.year_month_day());
      if (origDayOfMonth_ == 0) {
        origDayOfMonth_ = ymd.day;
        day_type endOfMonthDay(cal_type::end_of_month_day(ymd.year,ymd.month));
        if (endOfMonthDay == ymd.day) {
          origDayOfMonth_ = -1; //force the value to the end of month
        }
      }
      typedef date_time::wrapping_int2<short,1,12> wrap_int2;
      wrap_int2 wi(ymd.month);
      //calc the year wrap around, add() returns 0 or 1 if wrapped
      const typename ymd_type::year_type year(static_cast<typename ymd_type::year_type::value_type>(ymd.year + wi.add(f_)));
//       std::cout << "trace wi: " << wi.as_int() << std::endl;
//       std::cout << "trace year: " << year << std::endl;
      //find the last day for the new month
      day_type resultingEndOfMonthDay(cal_type::end_of_month_day(year, wi.as_int()));
      //original was the end of month -- force to last day of month
      if (origDayOfMonth_ == -1) {
        return date_type(year, wi.as_int(), resultingEndOfMonthDay) - d;
      }
      da