Re: Dates and their formats



Damon Chaplin <damon@helixcode.com> writes:

> 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.

strptime() is portable accorss Unix systems (you have to be a bit
careful with the use, though, and clear the passed in tm structure).
For systems not having the functions you can use the glibc
implementation.  This is what some GNU packages already do.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------



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