`custom_date_format` only supports `YY` for the File Display

With custom_date_format set to, for example, dd-MM-YY, when encountering the "Confirm Folder Merge" / "Confirm File Replace" dialogues (and others?), the Date: info displays as 21-02-YY, instead of 21 for the 2-digit year.

The File Display's Modified and Created fields on the other hand have no issue and correctly display 21-02-21 as the date.

Using yy instead of YY solves the issue: the 2-digit year format works in all instances.

System information:

- Directory Opus v12.23.1 Beta x64 Build 7710
- Microsoft Windows 10 v20H2 OS Build 19042.804

It really doesn't make sense to use YY here, and I'd argue it's better for it not to work than to allow people to use the wrong year code and then not realise until the next new year when they start seeing dates with the wrong year on them.

YY is the ISO year, which ties in to the ISO week. It will not give you the year you expect in day-month-year dates close to a new year, and you should never use it in them.

More discussion here: Viewer Pane, Image properties are okay?

Maybe the bug is that it works anywhere. It should probably be blocked from working in the custom date formats at all, and reserved for things like rename presets.

I wasn't actually aware of their differences. Good thing it didn't work by the sounds of it else I would have ignorantly kept it as YY.

If anyone else stumbles across this, you'll likely want to use these (non-ISO): dd, MM, yy or yyyy.

Docs: Codes for date and time.

1 Like

We recently added some notes to those docs to make it more explicit that the ISO year code probably isn't what people expect, but the edits haven't made it to the online version yet.

If you go to the same page in the F1 help that comes with the program, it should have the extra warnings.

1 Like

We've made some changes for the next beta:

  • ISO Year, ISO Week Number, and Week Number codes should now work everywhere.

  • When loading configs from previous versions, any advanced custom_date_format(_long) settings that used ISO Year but not ISO Week will be corrected to use the normal year code (to fix configs for people who misunderstood what the codes meant).

  • When editing the same settings, if you use ISO Year but not ISO Week, Opus will tell you it's probably a mistake and offer to correct it for you. Anyone who really wants ISO Year by itself for some reason can say no, and the code will then be saved and loaded in the config as before.

1 Like