DateType inherits from Float type

This commit is contained in:
Thomas Scholtes 2014-09-14 16:17:12 +02:00
parent 492cf38927
commit 629fc0087d

View file

@ -61,12 +61,10 @@ class PathQuery(dbcore.FieldQuery):
# Library-specific field types.
class DateType(types.Type):
class DateType(types.Float):
# TODO representation should be `datetime` object
# TODO distinguish beetween date and time types
sql = u'REAL'
query = dbcore.query.DateQuery
null = 0.0
def format(self, value):
return time.strftime(beets.config['time_format'].get(unicode),