On 02/26/2015 10:58 PM, Thomas De Schampheleire wrote:
On Thu, Feb 26, 2015 at 10:51 PM, Thomas De Schampheleire
<[email protected]> wrote:
# HG changeset patch
# User Thomas De Schampheleire <[email protected]>
# Date 1424987487 -3600
#      Thu Feb 26 22:51:27 2015 +0100
# Node ID d80090d1053468f6b84eb8ef41c62446995ddb73
# Parent  c7f97c237dacbed8770d4aacf20feb8175ee8d99
date representation: use ISO8601 rather than a specific locale

Dates, in particular in technical systems like Kallithea, are
better shown in a clear concise format like ISO8601 (YYYY-MM-DD)
than in a verbose format like 'Thu, Feb 26 2015'.

This commit changes all dates to ISO8601.

---
If desired, we could create two functions: one that returns ISO format and
another for the locale format. Depending on the usage, one or the other is
shown. I'm not very fond of that though, it looks inconsistent.

diff --git a/kallithea/lib/helpers.py b/kallithea/lib/helpers.py
--- a/kallithea/lib/helpers.py
+++ b/kallithea/lib/helpers.py
@@ -469,7 +469,7 @@

  def fmt_date(date):
      if date:
-        _fmt = u"%a, %d %b %Y %H:%M:%S".encode('utf8')
+        _fmt = u"%Y-%m-%d %H:%M:%S".encode('utf8')
          return date.strftime(_fmt).decode('utf8')

      return ""
In some way related: certain dates in Kallithea are shown as an age '5
days ago' rather than an expanded date.

What is the strategy: when should we use what? Or should we always
show the age with the date as tooltip?

The current heuristics seems ok to me.

/Mads
_______________________________________________
kallithea-general mailing list
[email protected]
http://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to