-
- Notifications
You must be signed in to change notification settings - Fork 54
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
Summary
We could parse timestamps in the following frames: TDEN, TDOR, TDRC, TDRL, TDTG.
Instead of FrameValue::Text, they would now use FrameValue::Timestamp.
The structure is described in the ID3v2.4 frame overview:
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
pub struct TimestampFrame { // Year is required, and ID3v2 does not allow negative years pub year: u16, pub month: Option<u8>, pub day: Option<u8>, pub hour: Option<u8>, pub minute: Option<u8>, pub second: Option<u8>, }pub enum FrameValue { Timestamp(TimestampFrame), /// ... }Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed