Example #1
0
 def test_parse_date(self):
     # 1234567890 == 2009-02-13 23:31:30
     from_ts = parse_date('1234567890')
     from_str = parse_date('2009-02-13 23:31:30')
     self.assertTrue(isinstance(from_ts, int), 'parsed ts is not an int')
     self.assertTrue(isinstance(from_str, int), 'parsed str is not an int')
     self.assertEqual(from_ts, from_str)
Example #2
0
 def mdate(self):
     # get the modification date, from the time of the last changeset with
     # changes for this content, from the creation date, if this content was
     # never changed, or from the 'mdate' variable.
     if 'mdate' in self._vars:
         return parse_date(self._vars['mdate'])
     mdate = self._filectx.mdate
     if mdate is not None:
         return parse_date(mdate)
Example #3
0
 def mdate(self):
     # get the modification date, from the time of the last changeset with
     # changes for this content, from the creation date, if this content was
     # never changed, or from the 'mdate' variable.
     if 'mdate' in self._vars:
         return parse_date(self._vars['mdate'])
     mdate = self._filectx.mdate
     if mdate is not None:
         return parse_date(mdate)
Example #4
0
 def date(self):
     # get the creation date, from the time of the first changeset with this
     # content or from the 'date' variable.
     if 'date' in self._vars:
         return parse_date(self._vars['date'])
     return parse_date(self._filectx.date)
Example #5
0
 def date(self):
     # get the creation date, from the time of the first changeset with this
     # content or from the 'date' variable.
     if 'date' in self._vars:
         return parse_date(self._vars['date'])
     return parse_date(self._filectx.date)