sampsyo/beets — pull request #564 by geigerzaehler (2014-03-02 23:17:25+00:00)
Title: Remove date packing and invert date dependency

In my quest to eliminate the packing from storage styles I refactored the `date` field. Would be nice to get some peer reviews on this to make sure I didn't miss anything

Before, each year, month, and day field used packing to store its values in the same tag but at different positions. We then instantiated a `CompositeDateField` to combine the different values. This lead to code duplication in the storage styles for these fields. It also inverted the data dependency. It's more natural to think of year, month, and day as part of a date then as of a date as composed of these.

Now, only `DateField` class stores data in the files tag. This makes sense: One tag, one field that accesses it. To obtain access to the year, month, and day parts, the DateField is equipped with factories that create `DateItemField` instances associated to a `DateField`. These descriptor allow us to get and set parts of a date field.