]> Pileus Git - lackey/blobdiff - view/week.c
Fix some time keeping bugs
[lackey] / view / week.c
index c2d3089fc11f5ecd94936633f8f589b943f0e0c9..e9988e954ffa254a2349f402433b470d28b749ab 100644 (file)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2012 Andy Spencer <andy753421@gmail.com>
+ * 
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 #include <string.h>
 #include <ncurses.h>
 
@@ -32,7 +49,7 @@ void week_draw(void)
        for (int d = 0; d < 5; d++) {
                // FIXME..
                const char *str = hstep >= 10 ? day_to_string(d+MON) : day_to_str(d+MON);
-               mvwprintw(win, 0, x+ROUND(d*hstep), "%02d/%02d", month, day);
+               mvwprintw(win, 0, x+ROUND(d*hstep), "%02d/%02d", month+1, day+1);
                mvwprintw(win, 1, x+ROUND(d*hstep), "%s", str);
                add_days(&year, &month, &day, 1);
        }