mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-12 23:40:10 +01:00
[utils] DateRange
: Human readable __str__
This commit is contained in:
parent
7b50d71c59
commit
2369a2f8f6
@ -1379,6 +1379,9 @@ class DateRange:
|
||||
def __repr__(self):
|
||||
return f'{__name__}.{type(self).__name__}({self.start.isoformat()!r}, {self.end.isoformat()!r})'
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.start} to {self.end}'
|
||||
|
||||
def __eq__(self, other):
|
||||
return (isinstance(other, DateRange)
|
||||
and self.start == other.start and self.end == other.end)
|
||||
|
Loading…
x
Reference in New Issue
Block a user