Remove padding from date strings

The padding is removed by using %-d instead of %e or %d.

Examples:

"%B %d %Y"  -> "October 04 2018"

"%B %e %Y"  -> "October  4 2018"

"%B %-d %Y" -> "October 4 2018"

https://gitlab.gnome.org/GNOME/gnome-shell/issues/666
This commit is contained in:
Carmen Bianca Bakker
2018-10-15 16:50:02 +02:00
committed by Florian Müllner
parent cff9eaf5aa
commit 0f542c2e16
3 changed files with 7 additions and 7 deletions

View File

@ -73,7 +73,7 @@ var TodayButton = new Lang.Class({
* "Tue 9:29 AM"). The string itself should become a full date, e.g.,
* "February 17 2015".
*/
let dateFormat = Shell.util_translate_time_string (N_("%B %e %Y"));
let dateFormat = Shell.util_translate_time_string (N_("%B %-d %Y"));
this._dateLabel.set_text(date.toLocaleFormat(dateFormat));
/* Translators: This is the accessible name of the date button shown