Friday is tm_wday 5, not 6
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 13 Oct 1990 00:07:56 +0000 (16:07 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 13 Oct 1990 00:07:56 +0000 (16:07 -0800)
SCCS-vsn: usr.bin/calendar/calendar.c 4.11

usr/src/usr.bin/calendar/calendar.c

index e397429..7af7c44 100644 (file)
@@ -12,7 +12,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)calendar.c 4.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)calendar.c 4.11 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -133,7 +133,7 @@ settime()
                cumdays = daytab[0];
        }
        /* Friday displays Monday's events */
                cumdays = daytab[0];
        }
        /* Friday displays Monday's events */
-       offset = tp->tm_wday == 6 ? 3 : 1;
+       offset = tp->tm_wday == 5 ? 3 : 1;
        header[5].iov_base = dayname;
        header[5].iov_len = strftime(dayname, sizeof(dayname), "%A", tp);
 }
        header[5].iov_base = dayname;
        header[5].iov_len = strftime(dayname, sizeof(dayname), "%A", tp);
 }