1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-12-17 14:45:42 +07:00

Allow to use relative dates in the format (now|today)[+-][0-9](day|week|month|year)(s)? (Closes #137)

Also fix DateRange not accepting ranges of one day.
This commit is contained in:
Jaime Marquínez Ferrándiz
2013-04-28 11:39:37 +02:00
parent a11ea50319
commit 37254abc36
2 changed files with 28 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ def test_daterange(self):
self.assertTrue("19690721" in _ac)
_firstmilenium = DateRange(end="10000101")
self.assertTrue("07110427" in _firstmilenium)
def test_unified_dates(self):
self.assertEqual(unified_strdate('December 21, 2010'), '20101221')
self.assertEqual(unified_strdate('8/7/2009'), '20090708')