Re: It it now a leap year?

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

 



On Wed, 08 Aug 2007 12:31:23 -0400
Mike - EMAIL IGNORED <m_d_berger_1900@xxxxxxxxx> 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?

The math someone depends upon where you are but you can do it that way.
Be very careful however that you work from years not seconds or you'll
get it wrong (not all minutes are 60 seconds long)

localtime() will give you a year/day, the rest is up to you and depends a
lot on your choice of Calendar - Gregorian/Revised Julian (although these
split at 2800) etc, and of course quite a few of them don't have leap
days, some move months around and the iranian calendar is a work of art.

Viz: if you are going to localise your program you might want to keep its
knowledge of calendaring neatly seperated.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux