Return ctime() style string.
(self)
| 1993 | # Ways to produce a string. |
| 1994 | |
| 1995 | def ctime(self): |
| 1996 | "Return ctime() style string." |
| 1997 | weekday = self.toordinal() % 7 or 7 |
| 1998 | return "%s %s %2d %02d:%02d:%02d %04d" % ( |
| 1999 | _DAYNAMES[weekday], |
| 2000 | _MONTHNAMES[self._month], |
| 2001 | self._day, |
| 2002 | self._hour, self._minute, self._second, |
| 2003 | self._year) |
| 2004 | |
| 2005 | def isoformat(self, sep='T', timespec='auto'): |
| 2006 | """Return the time formatted according to ISO. |