You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The timestamp fields are based on a subset of ISO 8601. When being as precise as possible the format of a time string is yyyy-MM-ddTHH:mm:ss (year, “-”, month, “-”, day, “T”, hour (out of 24), ”:”, minutes, ”:”, seconds), but the precision may be reduced by removing as many time indicators as wanted. Hence valid timestamps are yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddTHH, yyyy-MM-ddTHH:mm and yyyy-MM-ddTHH:mm:ss. All time stamps are UTC.
API design
pubstructTimestampFrame{// Year is required, and ID3v2 does not allow negative yearspubyear:u16,pubmonth:Option<u8>,pubday:Option<u8>,pubhour:Option<u8>,pubminute:Option<u8>,pubsecond:Option<u8>,}
Leading zeros in month/day fields are often omitted or replaced by space(s). The parser should tolerate those violations from the standard, because they are very common.
If these recoverable errors could be detected easily then ParsingMode::Strict might reject them. If that would result in 2 different implementations than it's probably not worth the effort.
Summary
We could parse timestamps in the following frames: TDEN, TDOR, TDRC, TDRL, TDTG.
Instead of
FrameValue::Text
, they would now useFrameValue::Timestamp
.The structure is described in the ID3v2.4 frame overview:
API design
The text was updated successfully, but these errors were encountered: