Tdesktop: Customizable short date format in session list

Created on 18 Apr 2016  Â·  10Comments  Â·  Source: telegramdesktop/tdesktop

default
As shown in the picture, the short date in the red box meant 17 Apr 2016, not 16 Apr 2017. This may be very confusing for some users as they are generally used to year/month/day format short dates. Like me :(
Currently I can't find anything related to this in the language file so I guess it was uncustomizable. It would be nice if you make it customizable. Thank you.

current configuration: 0.9.42 on Windows 10

duplicate enhancement

Most helpful comment

All 10 comments

+1. I'm curious where you use YY/MM/DD. I know most of the world uses DD/MM/YY.

In the US (where I'm from), it's generally MM/DD/YY. Would love an option to set that as the date format. Perhaps you can even pull the localization settings from the computer to automagically set it to the correct format.

@stek29 Thank you for finding that.

I don't have any experience with Qt and don't have time to play with it, but if anyone has the project set up and is willing to make changes, I found two possible ways to easily make this change.

First:
There's the overloaded QDate::toString() function that seems to involve locale. And could replace the toString linked by stek29.

Or second:
There's the QLocale::DateFormat() which would return the date time format used in the locale which can be passed into toString linked by stek29.

@Royal2000H
China.
MMDDYY is also acceptable, but YYMMDD is most familiar. DDMMYY ... takes very long time to understand. This is a personal feeling, but I'm pretty certain that most Chinese will be glad to have YYMMDD.

Hardcoding the date format "d.MM.yy" is a bad idea. I would rather have the ISO 8601 "YYYY-MM-DD" date format be hardcoded.

ISO 8601 is the far superior standard date format and is great for organizing and sorting dates for the benefit of both computers and humans.

Don't forget that the date format is hardcoded in other places as well:
https://github.com/telegramdesktop/tdesktop/search?utf8=✓&q="d.MM.yy"

Rather than choose the best hardcoded format, I'd say making it match the system should be the priority.

At least matching the system short-date format. Maybe future there could be an option in the Settings page. ISO 8601 would definitely be a better hard-coded format than the current one.

What about using localization files for such things? If user doesn't like existing format he can make modified .strings file and use loadlang.
@john-preston would it fit w/ transifex stuff? Afaik telegram for iOS has formatter strings in localization file.

618 maybe setting to allow choice between system configuration and custom?

618

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abhyrz picture abhyrz  Â·  3Comments

FunctionalHacker picture FunctionalHacker  Â·  3Comments

TheAppService picture TheAppService  Â·  3Comments

slowaways picture slowaways  Â·  3Comments

qwitriy picture qwitriy  Â·  3Comments