aboutsummaryrefslogtreecommitdiff
path: root/src/calp.c
diff options
context:
space:
mode:
authorfoswret2026-05-02 13:01:10 -0500
committerfoswret2026-05-02 13:01:10 -0500
commit03ed4535c8489700058fb283837752035f3cf83d (patch)
tree731fc9b8959770c1c1e1d194cb37972f098365cf /src/calp.c
parent7540a10d9a2d377191b64a29e794d4b58f320347 (diff)
months start on correct first day of the month, no <time.h> needed
Diffstat (limited to 'src/calp.c')
-rw-r--r--src/calp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/calp.c b/src/calp.c
index 9360551..d1a1b62 100644
--- a/src/calp.c
+++ b/src/calp.c
@@ -21,6 +21,7 @@ int main (void) {
int num_of_months = 12;
extern int days_in_month[12];
+ // TBD: Add ability to choose filename
char *filename;
filename = "output.pdf";
@@ -61,7 +62,8 @@ int main (void) {
// Draw all months
for (int i = 0; i < num_of_months; i++) {
- draw_month(paper, cd, day, &dim, days_in_month[i]);
+ draw_month(paper, cd, day, &dim, days_in_month[i], day_of_week(1, i + 1, year));
+ printf("%d\n", day_of_week(1, i + 1, year));
// Goes to next page in pdf
cairo_show_page(paper);
}