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 710768 - Please extend GDateTime to support chinese lunar calendar
Please extend GDateTime to support chinese lunar calendar
Status: RESOLVED DUPLICATE of bug 344005
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on: 344005
Blocks:
 
 
Reported: 2013-10-24 00:29 UTC by Philipp
Modified: 2013-10-24 10:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philipp 2013-10-24 00:29:10 UTC
From the discussion on #344005 it seems to me that this would be on-topic for GDateTime.

I have a user request (in bug #530668) to show the chinese lunar calendar in the clock. The user sent a patch to use liblunar ( http://code.google.com/p/liblunar/ ), which seems to provide a GtkCalendar-like interface adapted to show the lunar calendar. Vuntz and Behdad argued in 2008/2009 that this would be more on-topic for GDateTime, which I'm inclined to agree with.

Please let me know if you agree.
Comment 1 Emmanuele Bassi (:ebassi) 2013-10-24 10:19:39 UTC
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.

this is really a duplicate of bug 344005.

*** This bug has been marked as a duplicate of bug 344005 ***