]> diplodocus.org Git - nmh/blobdiff - zotnet/tws/dtime.c
Put a note saying that the paths this file refers to (stuff in docs/) are
[nmh] / zotnet / tws / dtime.c
index bbfccf0f45e797204a00bd4899ad1a171a892584..adf153b6ff2572cb2acdbbb33fef8b9a8cff57ac 100644 (file)
@@ -460,6 +460,8 @@ set_dotw (struct tws *tw)
     tw->tw_wday =
        ((26 * month - 2) / 10 + day + year + year / 4
            - 3 * century / 4 + 1) % 7;
+    if (tw->tw_wday < 0)
+       tw->tw_wday += 7;
 
     tw->tw_flags &= ~TW_SDAY, tw->tw_flags |= TW_SIMP;
 }