Bug 365995 - Shorter date formats for vertical taskbar users.
Summary: Shorter date formats for vertical taskbar users.
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock (show other bugs)
Version: 5.7.2
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL: http://lum.uk/temp/DigitalClock.png
Keywords: usability
: 362836 366409 381548 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-07-22 21:25 UTC by Sarah Gardner
Modified: 2019-02-20 19:44 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.0
kde: Usability?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sarah Gardner 2016-07-22 21:25:37 UTC
Currently the shortest date format available is a 10-digit format, DD/MM/YYYY (in my locale), which is a bit too wide if you happen to prefer a vertical taskbar (useful on low-res widescreen devices).

Would it be possible to provide two shorter options (DD/MM/YY and DD/MM) for users with this setup, or a custom date format option (ala T-Clock Redux for Windows)

Reproducible: Always

Steps to Reproduce:
1) Move the panel to the side of the screen
2) Shrink the panel to 50px or less

Actual Results:  
Date is left-aligned and truncated with an elpisis (eg. DD/MM... as per screenshot)

Expected Results:  
Date is centred with no elipsis.
Comment 1 Kai Uwe Broulik 2016-08-03 12:51:31 UTC
Unfortunately Qt's date formatting options are rather limited and we have a ton of hacks in the clock because of that already. Letting Usability group decide whether it's worth the effort of adding such an option.
Comment 2 Thomas Pfeiffer 2016-08-04 21:52:30 UTC
Hacks are not good.

Currently I see these options:
1.) We try to convince Qt to offer more options or maybe even provide our own patches
2.) We recommend users to use a different locale for date (e.g. the German one has DD.MM.YY)
3.) We create a custom locale for shorter dates 

In any case, we should work within Qt's locale system instead of doing custom hacks which will certainly break at some point
Comment 3 Kai Uwe Broulik 2016-08-10 08:20:26 UTC
*** Bug 362836 has been marked as a duplicate of this bug. ***
Comment 4 G360 2016-08-11 00:03:54 UTC
This is not only useful for vertical taskbar users, more options for the date format would be very handy for horizontal panels, for example, show the date without the current year, as it is not useful, who doesn't know the current year. 

Or a general option to allow a string specifying the format.[1]

Currently in my setup: 
ISO:     2016-08-10 
Short: 10/08/2016


Allowing the user to specify the date using those strings, which QML allows, one could have:

Monday
Wed
Sep 4
15 Jan
7 October
Wednesday 10 August
10-8
10 Aug
 

Right know, Plasma 5.7.3, one has to manually edit DigitalClock.qml and in function setupLabels(), inside if (main.showDate)  For example:

--- /usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml	2016-08-10 18:44:57.835617323 -0500
+++ /usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml	2016-08-09 00:56:49.205248552 -0500
@@ -534,7 +534,8 @@
 
         if (main.showDate) {
             if (main.tooSmall) {
-                dateLabelLeft.text = Qt.formatDate(main.currentTime, main.dateFormat);
+                dateLabelLeft.text = Qt.formatDate(main.currentTime, "dddd d MMMM");
             } else {
                 dateLabel.text = Qt.formatDate(main.currentTime, main.dateFormat);
             }

Instead of main.dateFormat, use string format.[1]

 [1] http://doc.qt.io/qt-5/qml-qtqml-date.html#details
Comment 5 G360 2016-08-11 00:07:05 UTC
*** Bug 366409 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2017-10-16 04:13:54 UTC
*** Bug 381548 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2019-02-20 19:44:46 UTC
The date format is now fully customizable, so vertical panel users can do DD/MM/YY or DD/MM if desired.

However the font size isn't quite big enough. That's tracked by Bug 404611.