Crack

Whoever wrote gtk_calendar_get_date() was on serious crack.

void gtk_calendar_get_date_sane(GtkCalendar *calendar, guint *year, guint *month, guint *day) {
	gtk_calendar_get_date(calendar, year, month, day);
	(*month)++;
}

There. Much better.

Update: Some people referred me to localtime(3), which is on LSD in a similar way. Newsflash: you don't need to design a silly API just because someone else did so, too. APIs are supposed to help me, the programmer, to write sane programs without going mad. They're not supposed to be slapped together based on the ideas of other APIs.

It'd be great if the above function would be added to GTK+ proper.