def dumps(self):
non_empty = itertools.takewhile(bool, (self.year, self.month, self.day))<EOL>formatted = (u'<STR_LIT>'.format(part) for part in non_empty)<EOL>date = '<STR_LIT:->'.join(formatted)<EOL>return date<EOL>
Dump the date for serialization into the record.

        Returns:
            str: normalized date, in the form ``YYYY-MM-DD``, ``YYYY-MM`` or
                ``YYYY`` (depending on the information present in the date)