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.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux