| 280 | self.value = _strftime(value) |
| 281 | |
| 282 | def make_comparable(self, other): |
| 283 | if isinstance(other, DateTime): |
| 284 | s = self.value |
| 285 | o = other.value |
| 286 | elif isinstance(other, datetime): |
| 287 | s = self.value |
| 288 | o = _iso8601_format(other) |
| 289 | elif isinstance(other, str): |
| 290 | s = self.value |
| 291 | o = other |
| 292 | elif hasattr(other, "timetuple"): |
| 293 | s = self.timetuple() |
| 294 | o = other.timetuple() |
| 295 | else: |
| 296 | s = self |
| 297 | o = NotImplemented |
| 298 | return s, o |
| 299 | |
| 300 | def __lt__(self, other): |
| 301 | s, o = self.make_comparable(other) |