From 5385c5af067ad90b8dbe7ef82a9e877b5a26f5fc Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 25 Sep 2002 21:48:16 +0000 Subject: [PATCH] *** empty log message *** --- webcit/calendar_view.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index cb521cf0d..b6bff018d 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -95,21 +95,26 @@ void calendar_month_view(int year, int month, int day) { starting_tm.tm_mon = month; starting_tm.tm_mday = day; thetime = mktime(&starting_tm); + lprintf(9, "Starting at %s", asctime(localtime(&thetime))); tm = &starting_tm; while (tm->tm_mday != 1) { thetime = thetime - (time_t)86400; /* go back 24 hours */ + lprintf(9, "Backing off to %s", asctime(localtime(&thetime))); tm = localtime(&thetime); } /* Determine previous and next months ... for links */ previous_month = thetime - (time_t)864000L; /* back 10 days */ next_month = thetime + (time_t)(31L * 86400L); /* ahead 31 days */ + lprintf(9, "previous month is %s", asctime(localtime(&previous_month))); + lprintf(9, "next month is %s", asctime(localtime(&next_month))); /* Now back up until we're on a Sunday */ tm = localtime(&thetime); while (tm->tm_wday != 0) { thetime = thetime - (time_t)86400; /* go back 24 hours */ + lprintf(9, "Backing off to %s", asctime(localtime(&thetime))); tm = localtime(&thetime); } -- 2.39.2