Welcome Guest

Pages: 1
Date/Year formats and data
UKenGBPostDecember 1, 2020, 07:58
Advanced
Posts: 57
Registered:
April 30, 2020, 09:36
Normal topicDate/Year formats and data

So Yate and iTunes simply coerce all stored actual full dates to display only YYYY in the UI. Yate will also allow full dates to be stored in the YEAR tag and even fully display them if you select that in the Prefs. But…

How does Yate sort such dates? If 2 tracks have the same value for the YYYY component (but e.g. different MM) how will they be sorted in the list? Even though they both display as the same just YYYY (if set in Prefs.) will they be correctly sorted according to the full date data?

How would Yate sort a mixture of YYYY-MM-DD and YYYY data? As if MM and DD were both 00 (which could not be stored in a date field), or some other weird enforced unnatural sort order?

When a track with Year stored as YYYY-MM-DD is viewed in iTunes, it will be displayed just as YYYY. Presumably if that field/tag is then edited in iTunes, only YYYY will then be saved back to the file? Would this full date be truncated to YYYY when iTunes saved edits to any other tag, but NOT the Year? Does it write only the edited tag to the file or the entire tag set?

How does iTunes sort by Year if the files contain YYYY-MM-DD, or would I be right in thinking that iTunes only stores YYYY in its library file and hence any -MM-DD stored in the actual file would be irrelevant?

So, would really like to know how Yate and iTunes sort on date as outlined above.

2MR2PostDecember 1, 2020, 08:27
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicRe: Date/Year formats and data

How does Yate sort such dates? If 2 tracks have the same value for the YYYY component (but e.g. different MM) how will they be sorted in the list? Even though they both display as the same just YYYY (if set in Prefs.) will they be correctly sorted according to the full date data?

The dates are stored as text and the proper date format is ISO 8601 which conveniently sorts properly as text. Yate should sort in ascending order with additional components coming after. 2020, 2020-12-01, 2020-12-01:08:09, etc. ie. they should not be intermixed. That's why ISO 8601 is the only date/time format which makes sense.

How would Yate sort a mixture of YYYY-MM-DD and YYYY data? As if MM and DD were both 00 (which could not be stored in a date field), or some other weird enforced unnatural sort order?

The date/time stamps are not decomposed when sorted. This means 00 components will change the sort order. ie. 2020, 2020-00, 2020-00-00. As the 00s are invalid this should make no difference except if you specify a time component. ie. 2020-12-01 will precede 2020-12-01T00:00.

When a track with Year stored as YYYY-MM-DD is viewed in iTunes, it will be displayed just as YYYY. Presumably if that field/tag is then edited in iTunes, only YYYY will then be saved back to the file? Would this full date be truncated to YYYY when iTunes saved edits to any other tag, but NOT the Year? Does it write only the edited tag to the file or the entire tag set?
same as above.

Any time you edit something in iTunes/Music it imposes its own formatting. Only YYYY will be saved to the file if year is edited in iTunes/Music. They tend not to change tags which are not directly modified ... however there are no guarantees here and it might change from version to version.

How does iTunes sort by Year if the files contain YYYY-MM-DD, or would I be right in thinking that iTunes only stores YYYY in its library file and hence any -MM-DD stored in the actual file would be irrelevant?

I'm pretty sure that everything after YYYY is ignored when they sort as more than likely the info is simply not there.

UKenGBPostDecember 1, 2020, 09:04
Advanced
Posts: 57
Registered:
April 30, 2020, 09:36
Normal topicRe: Date/Year formats and data

You beat me to it. I was just trying things out and it is as you say. So Yate basically gets it right and iTunes, er, does its own thing.

Since iTunes only stores and references YYYY, when sorting on Year, two albums with the same Year tag are sorted first by the Year and then by the Sort Album, so normally that will mean alphabetically by Album title within that same year. So the Beatles Albums Yellow Submarine (I know originally an EP but from a data point of view it's an album) and Abbey Road were released in that order, but iTunes will sort those 2 as 1969, but then with Abbey Road first. This is not correct and you cannot readily correct this within iTunes.

Incredible really that after all these years of iTunes, Apple still haven't got their head around the fact that using only YYYY is not sufficient as albums can have been released in the same year. This is not rocket science, just who do they have developing this stuff? Kids obviously.

They also have never grasped that the album release date can not necessarily be derived from the Year of the tracks on that album.

They need to incorporate a true release DATE for both track and album. I'm not holding my breath. 🙁

Thanks for the quick confirmation though.

2MR2PostDecember 1, 2020, 09:12
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicRe: Date/Year formats and data

When it comes to iTunes/Music I've stopped hold my breath quite a while ago. I filed Music bug reports for the first Catalina beta and none of them have been fixed.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.014 seconds.