Re: Bug in GtkCalendar?



On Thu, 2003-02-13 at 07:52, Vladimir Djokic wrote:
      God day,
      Developers.

      Strange thing with GtkCalendar (GTK+ 2.2.1, GLib 2.2.1):

      when I retrieve date:

      /********/
      guint year, month, day;

      gtk_calendar_get_date (calendar, &year, &month, &day);
      /********/

      variable month is always -1. eg. January = 0, February = 1, ...,
December = 11?

      Is this a bug, or I'm doing something wrong?

Neither. It's just the way it works. (Perhaps not the best choice,
but not changable.)

http://developer.gnome.org/doc/API/2.2/gtk/GtkCalendar.html

says:

 Note that month is zero-based (i.e it allowed values are 0-11) while   
selected_day is one-based (i.e. allowed values are 1-31). 


Regards,
                                         Owen





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