GNOME Bugzilla – Bug 530668
add chinese lunar calendar for clock
Last modified: 2020-11-07 12:13:43 UTC
Please add chinese lunar calendar for clock applet in the next version.
Created attachment 110139 [details] [review] chinese lunar clock patch. this patch can add chinese lunar calendar for clock applet. It use liblunar.
The liblunar is here: http://code.google.com/p/liblunar
Created attachment 110142 [details] [review] chinese lunar clock patch. patch 110139 has error.
Any reason to not have this merged in glib/gtk+?
I have not tried. I think the merger is unlikely to glib/gtk+.
Why unlikely? It would fix the issue in all other programs, and not just the clock applet. The clock applet probably won't depend on a new library for this, since this is something that should really be in gtk+, IMHO.
It seems with this patch, you have to select at compilation time which calendar you want to use, that's not very flexible. What would be nice would be to add a dropdown list in the calendar, between the month and the year selection, which would allow you to change the calendar used (western, chinese, arabic...).
Also see bug 344005 which is about multiple calendar systems support in glib.
I agree that the calendar logic of this should be merged into GDateTime. Filed wishlist bug 710768 for this.
Review of attachment 110142 [details] [review]: The calendar logic should be merged into GDateTime, if possible. Even if we don't do that, the patch should be reworked to allow for runtime selection.
Emmanuele Bassi pointed us to bug #344005, which proposes (seperately from GDateTime) a new GCalendar API, which would be able to handle international calendars. Please discuss extending glib for the chinese lunar calendar there. Quoting ebassi: > GDateTime is not the right place for this: its documentation and API is > already pretty specific in defining it as based on the Gregorian calendar: > > GDateTime is a structure that combines a Gregorian date and time into a > single structure. > > what we need is a GCalendar API that allows transforming times and dates in > different calendars into GDateTime. > > GLib won't depend on an external library either. > > potential prior art: > > Cocoa: > https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSCalendar_Class/Reference/NSCalendar.html#//apple_ref/occ/cl/NSCalendar > > Qt: > does not have relevant API > > Windows: > there's API in the locale to get the calendar, but I haven't found any date > transformation API; admittedly, I haven't been looking for long.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old feature requests in Bugzilla which have not seen updates for many years. If you still use gnome-panel and if you are still requesting this feature in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/gnome-panel/-/issues/ Thank you for reporting this issue and we are sorry it could not be implemented.