Good day's time!
After updating PM to version 27.2.0, I've got an issue with current date displaying: in Russia, we have DD.MM.YYYY format, but now it shows DD/MM/YYYY. It's not critical, but I would like to know the reason: maybe there was some changes in toLocaleDateString() method or it's a localization issue, or something else?
Thank you!
Problem with current date displaying in PM v27.2.0 (x64)
Moderator: trava90
Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Problem with current date displaying in PM v27.2.0 (x64)
- Attachments
-
- How does it look now
- Date.png (2.84 KiB) Viewed 1350 times
Re: Problem with current date displaying in PM v27.2.0 (x64)
The ICU library was updated which handles internationalization. It seems the separator character has been changed but without looking into it in more detail (and without knowing exactly the code creating the date you show here) it'll be difficult to find the reason.
Yes it's possible that toLocaleDateString() has changed and that the library update introduced a bug... but some more details are needed. Can you provide some steps to reproduce and find out what is done correctly and what is done wrong? Did you check your O.S./system settings as well for the correct separator being in use?
Yes it's possible that toLocaleDateString() has changed and that the library update introduced a bug... but some more details are needed. Can you provide some steps to reproduce and find out what is done correctly and what is done wrong? Did you check your O.S./system settings as well for the correct separator being in use?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
Re: Problem with current date displaying in PM v27.2.0 (x64)
I saw it in the status bar, where my addon (Calendate) places current date. Moreover, I've got this issue in its main window (when 'calendate.xul' is calling). For example, here is my code:
MAIN WINDOW WITH CURRENT DATE (CALLED FROM 'calendate.core.js')
CURRENT DATE IN THE STATUS BAR PANEL (CALLED FROM 'button.core.js')
What about OS: I use Win7 x64 Enterprise (about 4 years). Nothing in my OS was changed since I updated my PM from v27.1.2 to 27.2.0. Today I did a rollback to PM v27.1.1 and all got right, the separators became again "dot" instead of "slash".
Hope this information helps both of us a little bit.
PS: Right now I was checking this code in a "Simple JS Editor" (or whatever it called in PM):
and I've got the"dot"- separators. Used version: 27.1.1.
MAIN WINDOW WITH CURRENT DATE (CALLED FROM 'calendate.core.js')
Code: Select all
var actual =
{
date : function ()
{
var dpicker = document.getElementById('calenDate-main-datepicker').value;
var tbox = document.getElementById('calenDate-current-date');
var today = new Date();
today.setTime(Date.parse(dpicker));
tbox.setAttribute('value', today.toLocaleDateString());
}
}
Code: Select all
var notify =
{
me: function()
{
// Getting formatted date
var bar = document.getElementById('calenDate-statusbarpanel-date');
var button = document.getElementById('calenDate-button');
var date = new Date();
var month = ('0' + (date.getMonth() + 1)).slice(-2);
var day = ('0' + date.getDate()).slice(-2);
var set = date.getFullYear() + '-' + month + '-' + day;
date.setTime(Date.parse(set));
// Adding current date to statusbar panel
bar.setAttribute('label',date.toLocaleDateString());
bar.style.fontWeight = 'bold';
//...and so on...
}
}
Hope this information helps both of us a little bit.
PS: Right now I was checking this code in a "Simple JS Editor" (or whatever it called in PM):
Code: Select all
var date = new Date();
var month = ('0' + (date.getMonth() + 1)).slice(-2);
var day = ('0' + date.getDate()).slice(-2);
var set = date.getFullYear() + '-' + month + '-' + day;
date.setTime(Date.parse(set));
alert(date.toLocaleDateString());
Re: Problem with current date displaying in PM v27.2.0 (x64)
Hmm yeah it looks like the ICU API has changed and it's not picking up the correct separators in our js engine.
Issue #976 created.
Issue #976 created.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
Re: Problem with current date displaying in PM v27.2.0 (x64)
This regression was fixed in 27.3.0a1.back0rifize wrote:It's not critical, but I would like to know the reason: maybe there was some changes in toLocaleDateString() method or it's a localization issue, or something else?
Re: Problem with current date displaying in PM v27.2.0 (x64)
Alrighty then! Отличненько!