[PATCH 1 of 2 V2] keyword: docstrings for additional date filters
Christian Ebert
blacktrash at gmx.net
Mon Mar 14 06:32:25 CDT 2011
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1300101599 -3600
# Node ID 20d13244f1928ab66d9ce1acc940981050d00339
# Parent c8df759ee5eda709a71254f8fb9bba8624ab5104
keyword: docstrings for additional date filters
diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -110,12 +110,20 @@
# date like in cvs' $Date
def utcdate(text):
+ ''':utcdate: Date. Returns a UTC-date in this format: "2009/08/18 11:00:13".
+ '''
return util.datestr((text[0], 0), '%Y/%m/%d %H:%M:%S')
# date like in svn's $Date
def svnisodate(text):
+ ''':svnisodate: Date. Returns a date in this format: "2009-08-18 13:00:13
+ +0200 (Tue, 18 Aug 2009)".
+ '''
return util.datestr(text, '%Y-%m-%d %H:%M:%S %1%2 (%a, %d %b %Y)')
# date like in svn's $Id
def svnutcdate(text):
+ ''':svnutcdate: Date. Returns a UTC-date in this format: "2009-08-18
+ 11:00:13Z".
+ '''
return util.datestr((text[0], 0), '%Y-%m-%d %H:%M:%SZ')
# make keyword tools accessible
More information about the Mercurial-devel
mailing list