Bug 244801 - ncal prints bogus information for Julian/Gregorian change date
Summary: ncal prints bogus information for Julian/Gregorian change date
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-14 04:19 UTC by Greg Lehey
Modified: 2020-03-29 04:22 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Lehey freebsd_committer freebsd_triage 2020-03-14 04:19:23 UTC
ncal -p prints a table with the transition date from Julian to Gregorian for some, but by no means all, "countries".  It also includes an entry for the country "Latin", with a transition date 9999-5-31.  The commit log for revision r45064 clarifies that this is because 9999-12-12 is out of range.

It's not clear why this entry was ever added.  Many real countries (Armenia and Azerbaijan, for example) aren't in this list.  Arguably the entire functionality should be removed; it's not needed for anything else in the program, and more up-to-date information is now readily available on the web (https://en.wikipedia.org/wiki/List_of_adoption_dates_of_the_Gregorian_calendar_per_country for example).  I would suggest at least removing the entry for "Latin".

Reported by: Hamid Ali.
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-03-29 04:19:18 UTC
A commit references this bug:

Author: grog
Date: Sun Mar 29 04:18:28 UTC 2020
New revision: 359419
URL: https://svnweb.freebsd.org/changeset/base/359419

Log:
  Remove spurious transition from Julian to Gregorian for country
  "Latin".

  Arguably the entire -p option should be removed.  It shows only a few
  countries, and it doesn't have any relationship with the rest of the
  program.

  PR:		244801
  Submitted by:	grog@
  Reported by:	Hamid Ali

Changes:
  head/usr.bin/ncal/ncal.c
Comment 2 Greg Lehey freebsd_committer freebsd_triage 2020-03-29 04:22:27 UTC
"Latin" removed from the list of transitions.  This is a conservative approach; the whole functionality should really be removed.