mercurial/util.py
changeset 6134 7b937b26adf7
parent 6111 213ea6eed412
child 6135 be91a77b7f18
--- a/mercurial/util.py	Sat Feb 16 13:01:27 2008 +0100
+++ b/mercurial/util.py	Sat Feb 16 13:33:38 2008 +0100
@@ -1533,6 +1533,10 @@
         s += timezone_format % (-tz / 3600, ((-tz % 3600) / 60))
     return s
 
+def shortdate(date=None):
+    """turn (timestamp, tzoff) tuple into iso 8631 date."""
+    return datestr(date, format='%Y-%m-%d', timezone=False)
+
 def strdate(string, format, defaults=[]):
     """parse a localized time string and return a (unixtime, offset) tuple.
     if the string cannot be parsed, ValueError is raised."""