Skip to content

Commit

Permalink
gnome-wall-clock.c: Update default date-time formats to adapt to
Browse files Browse the repository at this point in the history
GDateTime change.

The %l, %e and %k tokens now have additional leading space when
rendering a single digit number.

Currently:
'%A %B %e, %l:%M %p' -> 'Wednesday May  8,  1:03 AM'

With this commit:
'%A %B %-e, %-l:%M %p' -> 'Wednesday May 8, 1:03 AM'

ref:
https://gitlab.gnome.org/GNOME/glib/-/commit/7074122f308b7b3402fba250f2010778fdad6eff
https://gitlab.gnome.org/GNOME/glib/-/commit/7169f6e1e58a53e4b69e5d40f3fd192dd9cd8ed4
  • Loading branch information
mtwebster committed May 10, 2024
1 parent b554c49 commit f1f82b3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libcinnamon-desktop/gnome-wall-clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,31 +66,31 @@ G_DEFINE_TYPE_WITH_PRIVATE (GnomeWallClock, gnome_wall_clock, G_TYPE_OBJECT);

/* Default date format (typically matching date portion of WITH_DATE_* defaults.)
* Currently used by cinnamon-screensaver default clock */
#define DATE_ONLY (_("%A, %B %e"))
#define DATE_ONLY (_("%A, %B %-e"))

/* Default date/time format when show-date, show-seconds, use-24h are set */
#define WITH_DATE_24H_SECONDS (_("%A %B %e, %R:%S"))
#define WITH_DATE_24H_SECONDS (_("%A %B %-e, %R:%S"))

/* Default date/time format when show-date, show-seconds are set */
#define WITH_DATE_12H_SECONDS (_("%A %B %e, %l:%M:%S %p"))
#define WITH_DATE_12H_SECONDS (_("%A %B %-e, %-l:%M:%S %p"))

/* Default date/time format when show-date, use-24h are set */
#define WITH_DATE_24H (_("%A %B %e, %R"))
#define WITH_DATE_24H (_("%A %B %-e, %R"))

/* Default date/time format when just show-date is set */
#define WITH_DATE_12H (_("%A %B %e, %l:%M %p"))
#define WITH_DATE_12H (_("%A %B %-e, %-l:%M %p"))

/* Default date/time format when show-seconds, use-24h are set */
#define NO_DATE_24H_SECONDS (_("%R:%S"))

/* Default date/time format when just show-seconds is set */
#define NO_DATE_12H_SECONDS (_("%l:%M:%S %p"))
#define NO_DATE_12H_SECONDS (_("%-l:%M:%S %p"))

/* Default date/time format when just use-24h is set */
#define NO_DATE_24H (_("%R"))

/* Default date/time format with no options are set */
#define NO_DATE_12H (_("%l:%M %p"))
#define NO_DATE_12H (_("%-l:%M %p"))

#define NO_DATE ("")

Expand Down

0 comments on commit f1f82b3

Please sign in to comment.