Community
Participate
Working Groups
Overview --------- Operating systems allow user to select calendar type to be used for interpreting / configuring and manipulating dates in applications. For example, when default locale is set to Hebrew user is capable to select either Gregorian or Hebrew national calendar. Background ----------- Dates can appear in Eclipse in two contexts: 1. Date / Time stamps 2. Specification of dates via graphical date picker Support for National Calendar in date / time stamps was provided with resolution of bug 243270. Currently user can specify calendar type via command line parameter: -nlExtensions calendar=islamic Support for National Calendar in date / time stamps is provided via leveraging calendar support in ICU4J. What is missing ? ------------------ Graphical date picker was introduced into Eclipse 3.3 via DateTime SWT widget (http://help.eclipse.org/stable/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/DateTime.html). It was first officially announced here: http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/whatsNew/platform_isv_whatsnew.html . Unfortunately this widget does not support National Calendars.
This widget (and SWT) cannot see ICU4J and so cannot take advantage of bug 243270 Is it a custom widget? If not, it should be displaying what the OS determines. PW
The DateTime control is emulated on these platforms. Carbon -> graphical widget (SWT.CALENDAR style) GTK -> textual widget (SWT.DATE style) Motif -> both styles For the emulated widgets Calendar.getInstance() is used to handle dates. From bug#243270, these platforms will have this problem (ICU4J not used).
The DateTime control on Windows XP does not support different types of calendars. The same problem can be seem on native windows applications like the Control Panel. This problem has been fixed on Windows Vista. The DateTime control on GTK also does not support different types of calendars. Note we have not found a way to select the calendar type in the Gnome desktop either. The DateTime control on carbon (textual only) and cocoa (both) work properly according with the OS settings
We could fix carbon by using the cocoa control for the graphical widget. It seems that the other platforms (Windows XP, GTK and the emulated versions of comment#2) can only be fixed by writing yet another emulated version of the control using either ICU4J or OS support when available.
For GTK support, we can track the progress of this GTK bug: "glib needs to support non-gregorian calendars" - https://bugzilla.gnome.org/show_bug.cgi?id=344005 and the GtkCalendar bugs that it is blocking (Hebrew GtkCalendar, Persian GtkCalendar, etc). If you are interested in seeing this happen in Eclipse, please cc yourself to the GTK bug, and please provide them with some assistance, if possible.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.