Glibmm::Date problem



Hi!
I'm having problems with Glib[mm]::Date, concerning Day attribute. Below is my code, compilation command and the result. Everytjing is correct apart from Day. set_day() method also doesn't work. Do yo know what's incorrect? I've studied gtkmm header files and have no idea how to solve this problem.

*****
#include <glibmm.h>
#include <iostream>

int main()
{
   Glib::Date date;

date.set_dmy((Glib::Date::Day)15, (Glib::Date::Month)10, (Glib::Date::Year)2005);

   std::cout << "Year : " << date.get_year() << std::endl;
   std::cout << "Month: " << date.get_month() << std::endl;
   std::cout << "Day  : " << date.get_day() << std::endl;

   return 1;
}

g++ -Wall `pkg-config glibmm-2.4 --cflags --libs` test2.cc -o test2 && ./test2
Year : 2005
Month: 10
Day  :
*****

Regard
Tomek



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]