MCPcopy Index your code
hub / github.com/clips/pattern / strftime

Method strftime

pattern/db/__init__.py:114–118  ·  view source on GitHub ↗
(self, format)

Source from the content-addressed store, hash-verified

112 def timestamp(self):
113 return int(mktime(self.timetuple())) # Seconds elapsed since 1/1/1970.
114 def strftime(self, format):
115 if self.year < 1900:
116 # Python's strftime() doesn't handle year < 1900:
117 return strftime(format, (1900,) + self.timetuple()[1:]).replace("1900", str(self.year), 1)
118 return datetime.strftime(self, format)
119 def copy(self):
120 return date(self.timestamp)
121 def __str__(self):

Callers 3

__str__Method · 0.95
toISO8601Method · 0.80
_escapeFunction · 0.80

Calls 1

strFunction · 0.85

Tested by

no test coverage detected