Return ctime() style string.
(self)
| 2151 | # Ways to produce a string. |
| 2152 | |
| 2153 | def ctime(self): |
| 2154 | "Return ctime() style string." |
| 2155 | weekday = self.toordinal() % 7 or 7 |
| 2156 | return "%s %s %2d %02d:%02d:%02d %04d" % ( |
| 2157 | _DAYNAMES[weekday], |
| 2158 | _MONTHNAMES[self._month], |
| 2159 | self._day, |
| 2160 | self._hour, self._minute, self._second, |
| 2161 | self._year) |
| 2162 | |
| 2163 | def isoformat(self, sep='T', timespec='auto'): |
| 2164 | """Return the time formatted according to ISO. |