[Xfce4-commits] <postler:master> Omit current year and use more friendly date format

Christian Dywan noreply at xfce.org
Fri Jan 7 09:44:05 CET 2011


Updating branch refs/heads/master
         to 1eb9d124216eca05e48d0a4f7335bdbdf388e94b (commit)
       from 07884048dfe5d52b7e51f4396143262752c4fd9f (commit)

commit 1eb9d124216eca05e48d0a4f7335bdbdf388e94b
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Jan 6 23:13:33 2011 +0100

    Omit current year and use more friendly date format
    
    Fixes: https://bugs.launchpad.net/postler/+bug/697855

 postler/postler-messages.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/postler/postler-messages.vala b/postler/postler-messages.vala
index f4277b2..710122a 100644
--- a/postler/postler-messages.vala
+++ b/postler/postler-messages.vala
@@ -465,7 +465,12 @@ public class Postler.Messages : Gtk.TreeView {
             return _("Today") + GLib.Time.local (timestamp).format (" %X");
         if (days == 1)
             return _("Yesterday") + GLib.Time.local (timestamp).format (" %X");
-        return GLib.Time.local (timestamp).format ("%x %X");
+        if (the_time.get_year () == now.get_year ()) {
+            /* i18n: strftime format for full month name and day number */
+            return GLib.Time.local (timestamp).format (_("%B %e") + (" %X"));
+        }
+        /* i18n: strftime format for full month name, day number and year */
+        return GLib.Time.local (timestamp).format (_("%B %e, %Y") + (" %X"));
     }
 
     internal static string format_date (string date, GLib.Date now,



More information about the Xfce4-commits mailing list