mirror of
https://github.com/beetbox/beets.git
synced 2026-03-02 19:26:29 +01:00
Separate date formats onto individual lines
This commit is contained in:
parent
c3771f722c
commit
04e2975ee9
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue