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 416481 - GDate API for friendly date strings
GDate API for friendly date strings
Status: RESOLVED DUPLICATE of bug 325064
Product: glib
Classification: Platform
Component: general
2.12.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2007-03-09 15:27 UTC by Murray Cumming
Modified: 2007-03-16 04:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Murray Cumming 2007-03-09 15:27:07 UTC
It would be nice to have a g_data_get_* function to generate friendly data strings such as "Yesterday", "Today", "Two weeks ago", etc. Then the translations could all be done in glib.

There must be some example implementations in various programs.
Comment 1 Havoc Pennington 2007-03-09 15:36:59 UTC
Mugshot has a sample, http://svn.mugshot.org/dumbhippo/trunk/client/common/hippo/hippo-basics.c hippo_format_time_ago()

One thing about this though is that apps may tend to want this done slightly differently in different contexts.
Comment 2 Matthias Clasen 2007-03-16 04:26:51 UTC

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