aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-04-11 21:46:08 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-04-11 21:46:08 +0200
commit666d02884c686ffa4b2e485f35094d1d756491ea (patch)
tree997d074cd6ca9ea62c7f4732c2b0e5592f49349c
parent3f588477a208dd977e73b4317b07e8b7a69102f8 (diff)
downloadwcal-666d02884c686ffa4b2e485f35094d1d756491ea.tar.gz
wcal-666d02884c686ffa4b2e485f35094d1d756491ea.tar.xz
wcal-666d02884c686ffa4b2e485f35094d1d756491ea.zip
print year always padded to 4 digits
-rw-r--r--wcal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/wcal.c b/wcal.c
index 2f5e3bf..a0cc5ad 100644
--- a/wcal.c
+++ b/wcal.c
@@ -121,8 +121,7 @@ main(int argc, char *argv[])
printf("%s ", buf);
months++;
} else if ((tm->tm_mon == 0 && tm->tm_yday < 14) || weeks == 1) {
- strftime(buf, sizeof buf, "%Y", tm);
- printf("%s", buf);
+ printf("%04d", tm->tm_year + 1900);
} else {
printf(" ");
}