-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Tag::date_raw
to get date string before Timestamp
conversion
#45
base: main
Are you sure you want to change the base?
Conversation
Tag::date_raw
to get date string before Timepstamp
conversionTag::date_raw
to get date string before Timestamp
conversion
@pinkforest This looks fine. @mnpqraven out of curiosity, what format are your dates in? |
@Serial-ATA they are mostly in 'YYYY.MM.DD' so most of the parsing would fail or only the year is recognized and the days and months are 'None' |
Is that by choice, or is there some software out there writing dates like that? Both ID3v2 and Vorbis Comments are specified to have the |
Thanks you both - Could we by any chance put these behind something like I suspect exposing raw by-default would be hazardous as people may expect that it's well formed but it may have been injected with hazards where they must do their own sanitisation and payload checks for non-standard dates. Should the date parsing be opportunistic conditional e.g. to handle YYYY.MM.DD ? And where some fields are empty etc. Then also the problem with that is US/Rest date divide YYYY.DD.MM vs YYYY.MM.DD etc. big headache handling those yeah |
I think just having a doc comment explaining that the output could very well not be spec-compliant would be enough. In 99% of cases |
Ok if that is the case and we worry about ergonomic overs spec complianc e- Then why not change so it gets properly used and handled via enum-data:
That ensures people are aware of it and handle it to some level. |
That might be nicer, @mnpqraven would you be interested in implementing it that way? |
- split date tag to enum
I've added the
Would changing from |
Yes but it's okay as we can bump and it will be improve the API. Alternatively we can mark old functions |
Right now
date()
will always attempt a conversion toTimestamp
, and if the date format is not correct then not all fields will be returned. I think this can be a good escape hatch for getting the original date and parse to one's own format if needed.