[PATCH 1 of 1] keyword: docstrings for additional date filters
Christian Ebert
blacktrash at gmx.net
Sun Mar 13 14:19:21 UTC 2011
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1300025918 -3600
# Node ID ae8592225ec826cf9ae0008312b4039fd6838ed7
# Parent b217619a6cf5a334effed4f72c2fe552898a2c19
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