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

@ -866,11 +866,11 @@ var EventsSection = new Lang.Class({
if (sameYear(this._date, now))
/* Translators: Shown on calendar heading when selected day occurs on current year */
dayFormat = Shell.util_translate_time_string(NC_("calendar heading",
"%A, %B %d"));
"%A, %B %-d"));
else
/* Translators: Shown on calendar heading when selected day occurs on different year */
dayFormat = Shell.util_translate_time_string(NC_("calendar heading",
"%A, %B %d, %Y"));
"%A, %B %-d, %Y"));
this._title.label = this._date.toLocaleFormat(dayFormat);
},