Reuse day_of_month to check if date of month is 1

This commit is contained in:
Zoey
2025-05-01 18:27:05 +01:00
parent 82e39ecc00
commit 1c7760bd89
+1 -1
View File
@@ -486,7 +486,7 @@ gcal_month_cell_set_date (GcalMonthCell *self,
/* Month name */
day_of_month = g_date_time_get_day_of_month (date);
gtk_widget_set_visible (GTK_WIDGET (self->month_name_label), day_of_month == 1);
if (g_date_time_get_day_of_month (date) == 1)
if (day_of_month == 1)
{
g_autofree gchar *month_name = g_date_time_format (date, "%b");
gtk_label_set_text (self->month_name_label, month_name);