ISO dates

Have been using SetAttr META "tags:{date|yymm}" which gives the year and week number e.g 1922
Want to be able to use SetAttr META "tags:{date|d}" to give the number of the day e.g Monday = 1
but it gives 2.
After looking at https://en.wikipedia.org/wiki/ISO_week_date Monday is the 1st day of the week.

d is for day of the month not day of the week: https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Codes_for_date_and_time.htm

You can use ddd and dddd to get the name of the day of the week, but there isn't a code for the numeric day of the week (which is not used very often). You can get it via scripting, however: https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Scripting/Date.htm

Leo

My mistake it should have been SetAttr META "tags:{date|D}"

In your reply you said "there isn't a code for the numeric day of the week (which is not used very often)"
D does return the numeric day of the week, it is not documented in https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Codes_for_date_and_time.htm
Sunday is day 1
to
Saturday is day 7
Can this be changed to Monday as day 1 if it is to difficult it does not matter as it was just something I was trying. I can make a button that asks for a number from 1 to 7 but it seemed easier to use a built in code like SetAttr META "tags:{date|D}" but as it is 1 day out not much use.

The formatting is done by the OS, not by us. Using a script is what I would do.

Thanks

We can probably add DD as a code for ISO week date; I wouldn't want to change the existing behavior (even though it's undocumented) in case people are using it in rename presets.

1 Like

Jon

Yes that would be great.
Today Wednesday day 3 of week
Would you make DD return as 3 or 03 to me it does not matter which
Have just tried as a rename preset
{date|D} = 4
{date|DD} = 44

Jon

Thanks that works great
Another great job by Opus Devs

onedot3