aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/gui/print.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index d4f8752a62..65466883a7 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -298,8 +298,11 @@ build_month (ECalModel *model,
weekday = e_weekday_from_tm_wday (d_week);
+ /* Figure out which square we want to put the 1 in. */
+ weekday = (weekday + 7 - week_start_day) % 7;
+
for (i = 0; i < d_month; i++)
- days[d_week + i] = i + 1;
+ days[weekday + i] = i + 1;
if (start)
*start = e_weekday_get_days_between (week_start_day, weekday);