Boost logo

Boost Users :

From: paul (paulsika_at_[hidden])
Date: 2007-12-08 09:42:08


/* There seems to be something wrong with the month() member function
of boost::gregorian::date

   if you valgrind the executable of (*this) source file, you will see
that some blocks
   
   are "possibly lost" and some are also "still reachable".
   
   Yet, were you to comment out the line making use of month(), you
would see that
   
   valgrind sees no problem with the code.
   
   what seems to be the problem ?
   
   uname -a = Linux Stanford 2.6.22-14-generic #1 SMP Sun Oct 14
23:05:12 GMT 2007 i686 GNU/Linux

*/

#include <boost/date_time/gregorian/gregorian.hpp>
using namespace boost::gregorian ;

#include <iostream>
using namespace std ;
                         
int main()
{

        date today( day_clock::local_day() ) ;

        cout << "year = " << today.year() << endl ;
        cout << "month = " << today.month() << endl ;
        cout << "day = " << today.day() << endl ;
        
        return EXIT_SUCCESS;

}


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net