Forum

How to change the f...
 
Notifications
Clear all

How to change the format of dates should be clearer

3 Posts
2 Users
0 Reactions
4,805 Views
jean pierre huart
(@jphuart)
Posts: 35
Active Member
Topic starter
 
[#810]

Hello,

Great job, it's a nice project. I was just annoyed by the format of dates that was only following american style and I didn't find in administration where was the parameter to define my favourite format.

Knowing dojo, I wanted to go in the DateTextBox widgets to test if just adding a constraint on the display format will work for me. I found that this was present on one file, but commented. So I guessed that there should be a good reason for that and reading other topics I realize that just changing the preferences of my browser (edit/preferences/content/languages) from en_US (the default I never changed) to fr_BE does exactly what I want.

Wonderful, I've learned something new that I should implement in my applications using dojo, but I think it's worth to mention it somewhere, then why not in the 'user parameters' page. The soft is able to detect the browser and then display the ad hoc message to instruct the user how to modify the browser's locale settings.

Thanks a lot for what you are doing.
Ciao

Jean Pierre


 
Posted : 18 Nov 2012 18H16
(@babynus)
Posts: 14952
Member Admin
 

Hi,

Date and number formatting just uses Dojo default formatting, based on browser's locale.
There was a try to force format (maybe the commented code you found), to be able to propose to select format in the user parameters screen, but quickly faced issues on internationalization, because not taking into account all the possible formats for dates and numbers (particuliarly for some asian locales in China or Indonesia). :S
So I prefered let Dojo do it, because it does it right the good way. The constraint is that locale must be correctly defined in the browser parameters. 😉


 
Posted : 18 Nov 2012 19H11
jean pierre huart
(@jphuart)
Posts: 35
Active Member
Topic starter
 

Hi,

Ok well understood, and I think it's a good manner for dealing with locale formatting. By the way, this is not obvious for the user, and just explaining that in the user parameters page will be of great help and will avoid misunderstandings.

Ciao
Jean Pierre


 
Posted : 18 Nov 2012 22H58
Share:

Scroll to Top