Return ctime() style string.
(self)
| 2112 | # Ways to produce a string. |
| 2113 | |
| 2114 | def ctime(self): |
| 2115 | "Return ctime() style string." |
| 2116 | weekday = self.toordinal() % 7 or 7 |
| 2117 | return "%s %s %2d %02d:%02d:%02d %04d" % ( |
| 2118 | _DAYNAMES[weekday], |
| 2119 | _MONTHNAMES[self._month], |
| 2120 | self._day, |
| 2121 | self._hour, self._minute, self._second, |
| 2122 | self._year) |
| 2123 | |
| 2124 | def isoformat(self, sep='T', timespec='auto'): |
| 2125 | """Return the time formatted according to ISO. |