[Glade-users] How I know name of week from GtkCalendar ?

Damon Chaplin damon at karuna.uklinux.net
Thu Apr 13 04:41:23 EDT 2006


On Thu, 2006-04-13 at 06:37 +0700, Hariyanto wrote:
> I get date from GtkCalendar, and I got day, month, year. 
> 
>  calen = GTK_CALENDAR(lookup_widget(frm_get_date,"calendar1")); 
>   gtk_calendar_get_date(calen,&gyear,&gmonth,&gday);
> 
>   str_year = g_strdup_printf("%04i", gyear); 
>   str_month = g_strdup_printf("%02i", gmonth+1); 
>   str_day = g_strdup_printf("%02i", gday); 
> 
> How I can get name of week from Gtk Calendar on that date?


You can use the GDate functions from GLib, e.g.

http://developer.gnome.org/doc/API/2.0/glib/glib-Date-and-Time-Functions.html#g-date-get-weekday

Damon




More information about the Glade-users mailing list