Omit default components when formatting date time
It just looks nicer to have e.g. "2017" instead of "2017-01-01T00:00:00". The ID3v2.4.0 standard and the Matroska standard explicitely allow this format as well.
This commit is contained in:
parent
13a87b473d
commit
44fea6c8c2
|
@ -667,7 +667,7 @@ void TagValue::toString(string &result, TagTextEncoding encoding) const
|
|||
result = toTimeSpan().toString();
|
||||
break;
|
||||
case TagDataType::DateTime:
|
||||
result = toDateTime().toIsoString();
|
||||
result = toDateTime().toString(DateTimeOutputFormat::IsoOmittingDefaultComponents);
|
||||
break;
|
||||
default:
|
||||
throw ConversionException(argsToString("Can not convert ", tagDataTypeString(m_type), " to string."));
|
||||
|
|
Loading…
Reference in New Issue