Re: [gtk-list] adding date/time calculations to glib
- From: "Shawn T . Amundson" <amundson gimp org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] adding date/time calculations to glib
- Date: Wed, 7 Oct 1998 16:53:20 -0700
On Wed, Oct 07, 1998 at 02:44:20PM -0500, Jon Trowbridge wrote:
> I would like to propose that code for doing date and time calculations
> be added to glib.
I've given some thought to this recently, with the addition of
gtkcalendar to gtk.
The best C library I've found for this is from the Perl DateCalc
module. The author based the Perl code on C code which has a
nice interface, and would be easy to work into glib. This can
be found in libgnome/lib_date.[ch] (you might want to make sure
this is most current).
One issue with lib_date is it is not internationalized. That's fixable.
The month_length and day_name variables should be functions.
-Shawn
>
> This is one area where it seems like all sorts of different free
> programs are constantly reinventing the wheel. For example, gncal and
> gnumeric are both using different pieces of code to do basic
> calculations like the number of days in a month, mapping mm/dd/yyyy
> dates to julian dates, extracting dates from strings, calculating days
> of the week, etc.
>
> I'm now in a position where a few different free software projects
> (guppi, gtk--plot and goose) that I'm working on are also going to
> need to do date calculations. Rather than just cutting and pasting
> the same old code into these projects, I think that we would all be
> best served if some common code to provide this functionality was set
> up.
>
> To this end, I'm volunteering to do the work necessary to add this
> code to glib. I'd probably use timeutil.{c,h} from gncal as the basis
> for it, but with improvements and changes to fit it into glib's naming
> and coding conventions. gncal and gnumeric (as well as any other
> existing code that deals with dates and times) would hopefully be
> switched over to using the new glib code, but this wouldn't have to
> happen right away.
>
> -JT
>
>
>
>
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>
--
Shawn T. Amundson
amundson@gimp.org http://www.gimp.org/~amundson
"The assumption that the universe looks the same in every
direction is clearly not true in reality." - Stephen Hawking
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]