Re: Dates and their formats



Rob Brown-Bayliss wrote:
> 
> Hi all, is there a way to change from the backwards american date format
> for GNOME?
> 
> It's just something I noticed today when playing with a calendar widget
> in Glade.  Here in NEw Zealand we use the British date system, where we
> list the Day, then Month and year so tody would be 9/4/2000 but the
> amrican dates (4/9/2000) make me think it's the 4 of September.
> 
> Is there a Global Gnome variable I can set, or is this a general
> Linux/Unix thing I should set?

Unfortunately it is currently hard-coded in gnome-dateedit.c

It would be easy to set the string, using strftime with "%x" as the format.

Converting from a string back to a date (in gnome_date_edit_get_date) is
a bit harder. A comment mentions trying strptime, though I'm not sure that's
portable. Maybe using g_date_set_parse() from GDate (in glib) would be OK.


Damon



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