hgkw/keyword.py
changeset 892 d6b24cad9513
parent 890 ddd525b7dd4a
child 893 24924dfb8326
equal deleted inserted replaced
891:5d6d605c93f8 892:d6b24cad9513
   108     'kwfiles.ignoredunknown': 'none'
   108     'kwfiles.ignoredunknown': 'none'
   109 }
   109 }
   110 
   110 
   111 # date like in cvs' $Date
   111 # date like in cvs' $Date
   112 def utcdate(text):
   112 def utcdate(text):
       
   113     ''':utcdate: Date. Returns a UTC-date in this format: "2009/08/18 11:00:13".
       
   114     '''
   113     return util.datestr((text[0], 0), '%Y/%m/%d %H:%M:%S')
   115     return util.datestr((text[0], 0), '%Y/%m/%d %H:%M:%S')
   114 # date like in svn's $Date
   116 # date like in svn's $Date
   115 def svnisodate(text):
   117 def svnisodate(text):
       
   118     ''':svnisodate: Date. Returns a date in this format: "2009-08-18 13:00:13
       
   119     +0200 (Tue, 18 Aug 2009)".
       
   120     '''
   116     return util.datestr(text, '%Y-%m-%d %H:%M:%S %1%2 (%a, %d %b %Y)')
   121     return util.datestr(text, '%Y-%m-%d %H:%M:%S %1%2 (%a, %d %b %Y)')
   117 # date like in svn's $Id
   122 # date like in svn's $Id
   118 def svnutcdate(text):
   123 def svnutcdate(text):
       
   124     ''':svnutcdate: Date. Returns a UTC-date in this format: "2009-08-18
       
   125     11:00:13Z".
       
   126     '''
   119     return util.datestr((text[0], 0), '%Y-%m-%d %H:%M:%SZ')
   127     return util.datestr((text[0], 0), '%Y-%m-%d %H:%M:%SZ')
   120 
   128 
   121 # make keyword tools accessible
   129 # make keyword tools accessible
   122 kwtools = {'templater': None, 'hgcmd': ''}
   130 kwtools = {'templater': None, 'hgcmd': ''}
   123 
   131