FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 24
  1. #1
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,482

    cal for year 1700 is in error

    cal 1700 says that the year has 366 days, but that is wrong.

    Prior to 1580, the leap year rule was "every multiple of 4 years"

    Following 1580, the rule was
    Multiples of 100 are NOT leap years unless the year was a multiple of 400.

    ergo,
    1600 is a leap year
    1700 is not a leap year
    1800 is not a leap year
    1900 is not a leap year
    2000 is a leap year

    To whom do I contact for a bug report? Fedora? Gnu?
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  2. #2
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    15,603

    Re: cal for year 1700 is in error

    Not to be a wise guy Leslie, but what does it matter? I don't see how it is relevant to 2017?
    Glenn
    The Bassinator

  3. #3
    Join Date
    Nov 2008
    Posts
    324

    Re: cal for year 1700 is in error

    I'm sure that's not the only error, if you go that far back. But no doubt some history buff has a routine which adjusts for all the known calendar tweaks. Don't want to forget the leap seconds either.

  4. #4
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,682

    Re: cal for year 1700 is in error

    You will probably get a "won't fix" response.

    Great Britain and colonies did not adopt the Gregorian calendar until 1752, so it would be correct for 1700 to have had 366 days.

  5. #5
    Join Date
    Aug 2011
    Location
    India
    Age
    32
    Posts
    401

    Exclamation Re: cal for year 1700 is in error

    interesting. The "cal" as far as i know is a command of util-linux. Also terminal emulator on my android shows 29 days for 1700 and 1800 and even 2100 !

    I think this is important.

    The man page says under heading bugs
    The cal program uses the 3rd of September 1752 as the date of the Grego‐
    rian calendar reformation -- that is when it happened in Great Britain and
    its colonies (including what is now the USA). Starting at that date,
    eleven days were eliminated by this reformation, so the calendar for that
    month is rather unusual. The actual historical dates at which the calen‐
    dar reform happened in all the different countries (locales) are ignored.

    Alternative calendars, such as the Umm al-Qura, the Solar Hijri, the
    Ge'ez, or the lunisolar Hindu, are not supported.

  6. #6
    Join Date
    Nov 2006
    Location
    Detroit
    Posts
    6,659

    Re: cal for year 1700 is in error

    Quote Originally Posted by lsatenstein
    cal 1700 says that the year has 366 days, but that is wrong.

    Prior to 1580, the leap year rule was "every multiple of 4 years"

    Following 1580, the rule was
    Multiples of 100 are NOT leap years unless the year was a multiple of 400.

    ergo,
    1600 is a leap year
    1700 is not a leap year
    1800 is not a leap year
    1900 is not a leap year
    2000 is a leap year

    To[sic] whom do I contact for a bug report? Fedora? Gnu?
    You don't have to contact anyone. Did you read the man page, specifically the BUGS section?:
    Code:
    BUGS
           The cal program uses the 3rd of September 1752 as the date of the  Gre-
           gorian  calendar	 reformation  --  that	is  when  it happened in Great
           Britain and its colonies (including what is now the USA).  Starting  at
           that date, eleven days were eliminated by this reformation, so the cal-
           endar for that month is rather unusual.	The actual historical dates at
           which  the  calendar  reform  happened  in  all the different countries
           (locales) are ignored.
    So if you dislike the output of "cal 1700" then you're really going to hate to see what cal shows for September 1752:
    Code:
    $ cal 9 1752
       September 1752
    Su Mo Tu We Th Fr Sa
           1  2 14 15 16
    17 18 19 20 21 22 23
    24 25 26 27 28 29 30
    Notice the 11 days missing (Sep 3-13)? It looks like for dates prior to September 3 1752, cal uses the Julian calendar. And in the Julian calendar, 1700 is indeed a leap year:
    https://en.wikipedia.org/wiki/Leap_y...ulian_Calendar

    By the way, cal is not a GNU program - it's part of the util-linux package, which is maintained by the Linux Kernel Organization. So you wouldn't contact the GNU people about cal anyway.

    But gcal, on the other hand, is a GNU program: https://www.gnu.org/software/gcal/
    And gcal also uses Sep 3 1752 as the default "changeover" date from Julian to Gregorian (reformed). One nice thing about gcal (which has loads more options than cal), is that you have the option to change that changeover date. From the gcal info pages:
    Code:
    '--gregorian-reform=1582|1700|1752|1753|ARGUMENT'
         Set the period which was skipped during the Gregorian Reformation.
         By default, Gcal runs in the "hybrid" calendar mode, i.e. Gcal
         automatically changes from the Julian calendar system to the
         Gregorian calendar system if output is related to dates after the
         Gregorian Reformation has happened.
    Upshot: use gcal, not cal.
    OS: Fedora 27 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 7GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N

  7. #7
    Join Date
    Aug 2011
    Location
    India
    Age
    32
    Posts
    401

    Re: cal for year 1700 is in error

    Quote Originally Posted by RupertPupkin
    You don't have to contact anyone. Did you read the man page, specifically the BUGS section?

    Should the behavior be same in android?

  8. #8
    Join Date
    Nov 2006
    Location
    Detroit
    Posts
    6,659

    Re: cal for year 1700 is in error

    Quote Originally Posted by topiwala
    Should the behavior be same in android?
    Yep, since it's probably using the Julian calendar for that year as well.
    OS: Fedora 27 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 7GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N

  9. #9
    Join Date
    Aug 2011
    Location
    India
    Age
    32
    Posts
    401

    Re: cal for year 1700 is in error

    cal 2100 on my android terminal emulator shows 29 days.

  10. #10
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,482

    Re: cal for year 1700 is in error

    Quote Originally Posted by glennzo
    Not to be a wise guy Leslie, but what does it matter? I don't see how it is relevant to 2017?
    Glenn,
    I wrote a date routine library, Julian, Gregorian, Unix, along with different calendaring algorithms. I did it for some cryptographic functions which use certain dates as an encryption salt value.

    The fact that my thought processes are on calendaring means it forces me to reaction-flinch everytime I find
    a year,month,day,dayofweek, leapyear miscalculation. I can't fall asleep at night, since it means
    that I have to review my code, their code, and a third party's code to see if there is an error.
    And when my code proves right..

    Is cal part of Linux raw, or a gnu library?
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  11. #11
    Join Date
    Mar 2011
    Location
    /
    Posts
    5,092

    Re: cal for year 1700 is in error

    Quote Originally Posted by lsatenstein

    Is cal part of Linux raw, or a gnu library?
    RupertPupkin has answered this above.
    Fedora 27 x86_64 XFCE - Sager | Intel Core i7 - 4810 MQ | NVIDIA GeForce GTX 860M | 16 GB RAM | 480 GB ADATA SSD |
    Fedora 27 x86_64 XFCE - Dell Precision M4800 | Intel Core i7 - 4900 MQ | NVIDIA Quadro K1100M | 16 GB RAM | 750 GB 7200 RPM HDD |


    The Linux Documentation Project | Fedora Documentation

  12. #12
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,482

    Re: cal for year 1700 is in error

    Bug was recorded against coreutils.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  13. #13
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,682

    Re: cal for year 1700 is in error

    Quote Originally Posted by lsatenstein
    Bug was recorded against coreutils.
    What are you suggesting they change ?

    If you are suggesting the changeover date be 1582 this would make the program incorrect for a lot (most) places.

    If I had to fix this I would add an option for the country code so the change over date from the Julian calendar could be taken into account. But I am not sure how a country code would work for countries that existed hundreds of years ago.

  14. #14
    Join Date
    Jan 2015
    Location
    Al Ain, UAE
    Posts
    735

    Re: cal for year 1700 is in error

    You should send your bug report to Caesar Augustus. He was the first guy that buggered up Julius' calendar, which then took many centuries to get fixed again.

    Anyhoo, that date is way before 1 Jan 1970, so your mileage will vary!
    --
    Have fun!
    http://www.aeronetworks.ca

  15. #15
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,482

    Re: cal for year 1700 is in error

    Basically, because the 1700 was declared a leapyear by cal, the days of the week for a date in 1700 and 1800 are in error, offset by more or less one day.

    Look for julian to gregorian date demo websites and check out the day of the week. My code and their code and all the code I collected indicates cal is wrong.

    And yes, september 3, is early, as a 10 day adjustment. Gregory did it for October. That means that with either 1582 correction, the last day of the year is corresponds.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

Page 1 of 2 1 2 LastLast

Similar Threads

  1. No mic in Dell Vostro 1700 Laptop
    By Hunkah in forum Hardware & Laptops
    Replies: 0
    Last Post: 28th April 2010, 02:19 AM
  2. Fedora 10 on Dell Vostro 1700
    By lucapolverini in forum Installation, Upgrades and Live Media
    Replies: 3
    Last Post: 20th March 2009, 11:33 PM
  3. XP Pro & Fedora 8 on Dell Vostro 1700
    By Crazyman1 in forum Installation, Upgrades and Live Media
    Replies: 14
    Last Post: 26th April 2008, 07:03 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •