Date format from header/footer token
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
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
Do you still have an unanswered question? Please log in first to post your question.
Comments
It follows the language settings. Other than that you don't have any influence
In reply to It follows the language… 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 I guess that means for each… by Doug Kerr
Which is the case if MuseScore's language is set to "System". Which in turn is the default setting.
In reply to Which is the case if… 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 Not so here. My MuseScore… by Doug Kerr
Here is the pertinent settings panel on my Windows 7:
And here is the footer with the text as '$d':
Doug
In reply to Here is the settings panel… 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 Oddly enough, when I start a… by Doug Kerr
Indeed that field is always using an ISO date
In reply to Indeed that files is always… by Jojo-Schmitz
Which is certainly nice, in one sense. (I thought long and hard before adopting a slightly different format for my house style.)
In reply to Here is the settings panel… by Doug Kerr
It just uses the default for your locale (en_US), which is dd/mm/yy (and mm/dd/yy for en_GB)
In reply to It just uses the default for… 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 jojo, Do you mean the locale… by Doug Kerr
English is a language, as is English (USA) or English (United States), but en, en_US, en_GB, etc. are locales (and these include more than just text in a certain language, also date formats, thousands- and decimal separators, currency, etc.).
In reply to English is a language, as is… 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 jojo, Thank you for that… by Doug Kerr
Yes
In reply to Yes 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
But see also https://musescore.org/en/node/327550 and https://musescore.org/en/node/69951