From 04e2975ee954e0117a7b79628809cc3ea0676ea0 Mon Sep 17 00:00:00 2001 From: discopatrick Date: Wed, 26 Apr 2017 23:21:47 +0100 Subject: [PATCH] Separate date formats onto individual lines --- beets/dbcore/query.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/beets/dbcore/query.py b/beets/dbcore/query.py index 4c109c5b8..949908bc2 100644 --- a/beets/dbcore/query.py +++ b/beets/dbcore/query.py @@ -534,7 +534,13 @@ class Period(object): """ precisions = ('year', 'month', 'day', 'hour', 'minute') - date_formats = (('%Y',), ('%Y-%m',), ('%Y-%m-%d',), ('%Y-%m-%dT%H', '%Y-%m-%d %H'), ('%Y-%m-%dT%H:%M',)) + date_formats = ( + ('%Y',), # year + ('%Y-%m',), # month + ('%Y-%m-%d',), # day + ('%Y-%m-%dT%H', '%Y-%m-%d %H'), # hour + ('%Y-%m-%dT%H:%M',) # minute + ) def __init__(self, date, precision): """Create a period with the given date (a `datetime` object) and