Page 1 of 1

Date Sorting - reading format incorrectly

Posted: August 21st, 2022, 11:23 pm
by nt4os
I am using Date Sorting for one category of download but the SAB Date Sorting script is reading the date wrong.

I have a file name with a date format of 22.07.14. It converts it to 2014-07-22 instead of the correct date of 2022-07-14. I don't see any switches or configuration I can change to fix this.

Is there anything simple I can do to fix this?

Thanks,

Re: Date Sorting - reading format incorrectly

Posted: August 22nd, 2022, 2:06 am
by safihre
No there isn't. But thanks for reporting this, as it looks like something we should maybe fix in the backend.

Re: Date Sorting - reading format incorrectly

Posted: August 22nd, 2022, 2:34 am
by sander
I wonder how you can "fix" this. It depends on country how "10-11-12" is interpreted: 10 nov 2012, or 2010 nov 12, or 2010 11 december.

SAB cannot know if it's DMY or YMD or even MDY.

The solution ... quote from See https://en.wikipedia.org/wiki/Date_format_by_country :

"The ISO 8601 format YYYY-MM-DD (2022-08-20) is intended to harmonize these formats and ensure accuracy in all situations. Many countries have adopted it as their sole official date format, though even in these areas writers may adopt abbreviated formats that are no longer recommended."

Re: Date Sorting - reading format incorrectly

Posted: August 22nd, 2022, 4:21 am
by safihre
I agree Sander, that is also what nt4os wants: 22.07.14 should be 2022-07-14. Right now Guessit interpreted it as the European-style.
Luckily it has an option to change that.

Re: Date Sorting - reading format incorrectly

Posted: August 22nd, 2022, 12:55 pm
by safihre
Fixed it.
If you are on Windows or macOS, you can download the fixed release here in a few minutes:
https://github.com/sabnzbd/sabnzbd/acti ... 2906014599
(requires GitHub account)
Otherwise, it will be in the next release.

Re: Date Sorting - reading format incorrectly

Posted: August 22nd, 2022, 6:25 pm
by nt4os
thank you very much for the fast fix and understanding. I will grab the update and give it a try.

Regards,