INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: DATE= in FLACS is YYYY and missing month and day  (Read 926 times)

Gchq

  • Recent member
  • *
  • Posts: 6
DATE= in FLACS is YYYY and missing month and day
« on: March 22, 2021, 06:09:26 am »

Hi, new customer here.

I am trying to import FLAC files to the library.
In those FLAC files the date is stored in this format (used hex editor to find out)
YEAR=2001-11-25  so yyyy-mm-dd
It might look odd, as that is a full date and not year, but that's how it is.
There is no DATE tag in the FLACS.
Unfortunately mc is not able to read this tag.

I could solve this myself by replacing the "YEAR=" by "DATE=" in the original files,
and then MC is able to read date correctly (and also the calculated year, month & days are okay now)

1. if there's no DATE tag, can MC default to read the YEAR tag as a date ?

But the biggest issue I have is when I start adjusting the date in MC.

Suddenly
YEAR tag is now gone (not that important)
DATE is now yyyy (no month, no day)
I noticed JR_DATE is added which is a number and that is fine,

The issue:  the full date has now become unreadable for other programs.
Those can only read the year and no longer the month and day.
And those are not familiar with the JR number notation, so it's gone.

2. Is there a way to make sure the DATE is written as YYYY-MM-DD and not as YYYY ?

Thanks.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: DATE= in FLACS is YYYY and missing month and day
« Reply #1 on: March 22, 2021, 06:13:59 am »

You can copy tags in MC.  Should be in the wiki.

Select files.

Copy the tag (ctrl-c)

Paste the tag (ctrl-shift-v)   

Try a few before you do very many.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: DATE= in FLACS is YYYY and missing month and day
« Reply #2 on: March 22, 2021, 06:44:46 am »

MC imported the existing YEAR as, you know, an Year number, and put that into the Date field (just the year - internally it has the date as January 1 of that year). The number in JR_DATE is just an internal representation of the date (number of days since 1900, similar to Excel representation of dates).

You'll need to fix those dates manually in MC. It's simpler than editing the files to change the tag name, no?
Logged

Gchq

  • Recent member
  • *
  • Posts: 6
Re: DATE= in FLACS is YYYY and missing month and day
« Reply #3 on: March 22, 2021, 08:07:15 am »

You can copy tags in MC.  Should be in the wiki.
Select files.
Copy the tag (ctrl-c)
Paste the tag (ctrl-shift-v)   
Try a few before you do very many.

Thanks for you reply but this doesn't work. I'll try to explain myself.

1. The date field is empty when I imported the flacs containing no "DATE=" tags but only "YEAR=yyyy-mm-dd"
2. once I entered a date manually MC is removing those YEAR tags, and added "DATE=yyyy" (without "-mm-dd")
It did add a JR-DATE tag which is useful for MC, but other programs don't know that, and so the full date is lost for those.

I retried this when I manually replaced the "YEAR=yyyy-mm-dd" tag by "DATE=yyyy-mm-dd",
and then MC was able to read the DATE tags correctly.

But the real issue then is once I change an incorrect date, fi. 2010-5-20 to 1991-5-20, then
MC would save "DATE=yyyy". (so the "-mm-dd" part is gone!)
I know JRiver also adds a JR_DATE but that is usable for MC only but my other programs can no longer see the month and day.

Wouldn't it be more logical is MC saved "YEAR=yyyy" and "DATE=yyyy-mm-dd" and not "DATE=yyyy" ?

I'm willing to change all my flacs to contain DATE=yyyy-mm-dd i.s.o. YEAR=yyyy-mm-dd so MC can read those,
but I would like that MC is not removing the -mm-dd when changing dates from within MC.
Logged

Gchq

  • Recent member
  • *
  • Posts: 6
Re: DATE= in FLACS is YYYY and missing month and day
« Reply #4 on: March 22, 2021, 08:14:49 am »

MC imported the existing YEAR as, you know, an Year number, and put that into the Date field (just the year - internally it has the date as January 1 of that year). The number in JR_DATE is just an internal representation of the date (number of days since 1900, similar to Excel representation of dates).

You'll need to fix those dates manually in MC. It's simpler than editing the files to change the tag name, no?

Thank you for your reply.
MC however did not import the "YEAR=" tag from the flac files. Those tags are "YEAR=yyyy-mm-dd" in my flacs and either MC doesn't read year, or it cannot handle the longer date format.

I know you can edit tags in MC, but I would like to keep the full date "yyyy-mm-dd" tag in the flacs so other programs can still read the full date,
other programs don't know jr_date and after editing those no longer see the month and day.
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: DATE= in FLACS is YYYY and missing month and day
« Reply #5 on: March 23, 2021, 04:18:32 am »

i can enter any valid long date into [DATE] and it works fine.  i suspect so does everyone else's, considering i've never seen this issue come up before.

there is clearly something else going on.  what are you using to tag the files outside of MC?
Logged

Gchq

  • Recent member
  • *
  • Posts: 6
Re: DATE= in FLACS is YYYY and missing month and day
« Reply #6 on: March 23, 2021, 08:00:45 am »

I try to summarize :

I have 2TB of flac files with a tag that reads : "YEAR=yyyy-mm-dd" there is no DATE tag (checked with hex editor)

My local date setting is dd/mm/yyyy (slashes as seperators, day first, then month, then year) ... this might be helpful? (country = Belgium, Dutch speaking)

For some reason, MC is not able to read those year tags. Other programs have no problem reading this complete tag and showing it.
When I replace the name YEAR with DATE in the original flac files then MC is able to read the full date (and the calculated values as well)
It shows then as "Date : dd/mm/yyyy" in MC which is fine.

But once I change the date, mc is overwriting the original "DATE=yyyy-mm-dd" with "DATE=yyyy" and ads a "JR_DATE=number" tag.
For MC this is working fine, but in other programs like MP3 tag, I can no longer read the full date "yyyy-mm-dd" I only see "yyyy" now.

My questions are :
1. Why can't MC read the date from the original "YEAR=yyyy-mm-dd" tag?
Is that because of the wrong seperators ? ('/' here, '-' elsewhere?)
It does seem to work when I replace YEAR with DATE in the flac files.

2. How can I make sure the complete date is preserved as "yyyy-mm-dd" in the FLAC?

3. What tag is MC reading to get the Date field when making it's library when there's not yet a JR_DATE field?

Thank you for your time.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: DATE= in FLACS is YYYY and missing month and day
« Reply #7 on: March 23, 2021, 08:44:33 am »

From your comments it looks like those FLACs are tagged using the Vorbis tag format (text lines like TAGNAME=VALUE).
Regarding the DATE field on Vorbis spec:

The date format for any field describing a date must follow the ISO 8601 standard: YYYY-MM-DD, shortened to just YYYY-MM or simply YYYY. We have been recommending this usage with the DATE tag for some time.

So try that, or change to ID3v2 format. YEAR is not a common Vorbis tag; it's not supposed to have the full date.
If you're having the trouble of fixing those dates on each file, why not do it using MC after importing the files?
Logged

Gchq

  • Recent member
  • *
  • Posts: 6
Re: DATE= in FLACS is YYYY and missing month and day
« Reply #8 on: March 23, 2021, 03:31:58 pm »

If you're having the trouble of fixing those dates on each file, why not do it using MC after importing the files?

I'm not getting anything in MC now, because the year tags containing the full date are not read at all. Entering them manually for each will take way too long (2TB).

But thank you for your explanation, it makes sense, I'll change the tagnames from YEAR to DATE with a program that browses recursively through my NAS flac folder,
and I'll do an import after that. (MC is reading the date correctly than).


Last question :

So now I have flacs with these tags : "DATE=YYYY-MM-DD".
How can I make sure MC saves any date changes I make to the "Date" field also as "DATE=yyyy-mm-dd" and not just as "DATE=yyyy"?
(It's first time I use MC; maybe I need to change a setting for that?)

Thank you.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: DATE= in FLACS is YYYY and missing month and day
« Reply #9 on: March 23, 2021, 03:46:18 pm »

Looks like it's a feature, somehow:

https://yabb.jriver.com/interact/index.php/topic,58596.msg396443.html#msg396443
15.0.68 (6/28/2010)
14. Changed: Ignore anything past the first 4 digits in a FLAC vorbis DATE tag.

Only the devs can tell why that was done, more than 10 years ago. Maybe it's time to revert that change.
Logged

Gchq

  • Recent member
  • *
  • Posts: 6
Re: DATE= in FLACS is YYYY and missing month and day
« Reply #10 on: March 24, 2021, 05:29:30 am »

Thanks,

I agree,
I would like the format to be kept that was there when the flac was imported in the library.

There seem to be 3 formats that FLAC uses in Vorbis tags for storing the date : DATE=yyyy-mm-dd, DATE=yyyy-mm and DATE=yyyy
https://wiki.xiph.org/VorbisComment#Date_and_time

If it was DATE=yyyy-mm-dd, then MC should be able to save changes made to the date field as well as DATE=yyyy-mm-dd and not as DATE=yyyy.


I noticed by the way that windows uses the date field as well. It shows up when right clicking > properties > details
under "Release date:" and it shows the full yyyy-mm-dd, until I make a change in the date field in mc, then it becomes yyyy only!

For now, I will make sure not to make changes to the "Date" field in MC, and do it the hard way (hexeditor, change date in flac header, and do import library from tags)
How to get in touch with the dev team?
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: DATE= in FLACS is YYYY and missing month and day
« Reply #11 on: March 24, 2021, 06:00:28 am »

Quote
How to get in touch with the dev team?
You'll have to fly to Minneapolis to touch them but I don't think they'll appreciate that, with COVID and all...  ;D

(they read these forums. Try a Rain Dance if they don't respond. Or create a new topic with a feature/change request.)
Logged
Pages: [1]   Go Up