Date format from header/footer token

• Jan 5, 2022 - 01:38

Do we have any control of how the date is formatted when we use the '$D' and '$d' tokens in a header or footer?

Thanks.

Doug


Comments

In reply to by Jojo-Schmitz

I guess that means for each language setting there is a preordained format, presumably the one commonly used in some country where that language is the preeminent one.

It would be desirable if, at the least, there were a preference choice to use the format established for general use under the operating system of the computer involved. We might expect that each user would have arranged for that to be the one of his choice. Or by default, it would be the one used by default in the O/S for the locality set for the O/S.

Doug

In reply to by Jojo-Schmitz

Not so here. My MuseScore language is set to "System". My Windows 7 is set to present dates by default in this format:

2022.01.05

If I use $d (for example) in a header/footer text of a MuseScore score, the date is rendered as:

1/5/22

Perhaps the problem is that my Windows date format setting is a "custom" one.

Doug

In reply to by Doug Kerr

Oddly enough, when I start a New score, in the Properties, the field 'creationDate' is prepopulated with the current date in this format:

2022-01-05

which is in fact the ISO standard for the numerical presentation of a date.

This is not my O/S default short date format, which is:

2022.01.05

Doug

In reply to by Jojo-Schmitz

jojo,

Do you mean the locale as inferred from the MuseScore language setting or the locale otherwise attributed to the O/S?

In any case, 'en_US' is a language, not a "locale".

In any case, that was not what was said above: "If the language were 'System', the MuseScore format would be the format set as the default for the O/S."

And my MuseScore language setting is 'System'.

In reply to by Jojo-Schmitz

jojo,

Thank you for that clarification.

So can I conclude that the "locale" of my computer system (more precisely, of its Windows 7 O/S) is 'en_US'?

In the Windows Control panel "Region and Language" applet, "Location" is set as 'United States' and "Format" is set to 'English (United States)'.

Then, if in MuseScore I choose as language 'System', that is the same as if I had chosen 'English (US)'? And thus I get the date format established in MuseScore for that language?

Doug

In reply to by Jojo-Schmitz

So, when in MuseScore, in Preferences, when I set a Language, I am actually setting a locale, presumably the one that has that language as an important attribute? That is, if I set Language to 'English (US)' I am actually selecting the locale identified in ICU notation as 'en_US'?

Then the short date format ("Date 3" in ICU notation) should be:

1/5/22

Which MuseScore follows.

Doug

Do you still have an unanswered question? Please log in first to post your question.