On Wed, 2007-08-08 at 12:31 -0400, Mike - EMAIL IGNORED wrote: > Is there a system call or variable that will > tell me if it is now a leap year, or should I > do the arithmetic? > > Mike. It's not part of the "standard" set of API calls, but GLib (a library used by many desktop applications and GTK+ itself for portability and handling of various data structures) contains a function called g_date_is_leap_year [1] that may help you in this. Also, if you're using C++ instead, there is the official GLib C++ wrappers (GLibmm), the Glib::Date::is_leap_year member function will do the same. Thirdly, Boost has a date_time library whose gregorian type contains an "is_leap_year" function which also acts similarly. [1] http://tinyurl.com/2mb24t [2] http://tinyurl.com/3awun4 [3] http://tinyurl.com/2q4tzn Hope that helps. -- Peter Gordon (codergeek42) GnuPG Public Key ID: 0xFFC19479 / Fingerprint: DD68 A414 56BD 6368 D957 9666 4268 CB7A FFC1 9479
Attachment:
signature.asc
Description: This is a digitally signed message part
-- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list