After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 166465 - Year may be zero or negative.
Year may be zero or negative.
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkCalendar
unspecified
Other All
: Normal minor
: Medium fix
Assigned To: gtk-bugs
gtk-bugs
: 362972 603179 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-02-06 17:39 UTC by Brant Gurganus
Modified: 2018-04-15 00:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
A patch to change the calendar's year behaviour (6.58 KB, patch)
2007-03-18 19:00 UTC, Sameer Morar
none Details | Review

Description Brant Gurganus 2005-02-06 17:39:00 UTC
Please describe the problem:
The year may be zero or negative.  There was never a year zero and negative
years should be positive with a BC suffix.

Steps to reproduce:
1. Click the Clock applet.
2. Change the year backwards.

Actual results:
The year will eventually get to zero and negative years.

Expected results:
The zero is skipped and negative years are positive with a BC suffix.

Does this happen every time?
Yes.

Other information:
While zero and negative years are used in the ISO 8601 version of the Gregorian
calendar, that usage is focused around astronomy.  Astronomers do not seem to be
a target audience of Gnome.  See http://en.wikipedia.org/wiki/ISO_8601 and
http://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar as references.
Comment 1 Sameer Morar 2007-03-18 19:00:07 UTC
Created attachment 84839 [details] [review]
A patch to change the calendar's year behaviour

This patch changes the calendar's year behaviour. Year 0 now becomes 1 BC, and negative years are represented as (-1*X + 1) BC.

A new display option defined, as GTK_CALENDAR_YEAR_ASTRONOMICAL, which reverts the calendar widget to astronomical year numbering, which was its default behaviour.

References:
http://en.wikipedia.org/wiki/Astronomical_year_numbering
Comment 2 Carlos Garnacho 2007-04-07 18:35:58 UTC
I rather think that GtkCalendar allowing year being <= 0 is a "visual" glitch, as it doesn't allow setting/getting years below 0 API-wise (note the guint year parameter), so I think it should just set the relevant arrows insensitive.
Comment 3 Sameer Morar 2007-04-07 19:27:04 UTC
Fair point, I didn't check the setting/getting function when creating this patch. Perhaps this is another bug, because depending on the calendar's widget's usage, years <=0 may be important.

For example: an astronomical application, where someone could want to see what the stars were doing on a particular date, then the calendar should allow to go below 1 AD. Same thing could go for a historical application. (Don't know of any projects that need these at the moment tho)

Perhaps the default behavior should be changed, and allow options to have both the   ISO 8601 and non ISO 8601 behavior for <=0 years?
Comment 4 Matthias Clasen 2010-08-11 04:24:17 UTC
*** Bug 362972 has been marked as a duplicate of this bug. ***
Comment 5 Timothy Arceri 2013-10-17 07:26:05 UTC
*** Bug 603179 has been marked as a duplicate of this bug. ***
Comment 6 Matthias Clasen 2018-02-10 05:25:45 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 7 Matthias Clasen 2018-04-15 00:35:31 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new