What would be a good way of storing date/time data with various precisions in a single field or attribute. For example, if I had a Movie class with a release_date property, and sometimes it would be a specific date like 2012-12-24, and other times it may just be 1948, with no month or day. Ruby doesn't allow for zero-value date parts.
My only good idea so far has been to store the data polymorphicly with another field storing the time as either Number or Time, and the date value would always be stored as an integer, but even that seems really ugly. Other than that all I can think of is storing each data part separately, but that sounds like it would make sorting a nightmare.
Perhaps there's a common way of doing this that I'm unaware of.