about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-08-29 17:48:32 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-08-29 17:48:32 +0200
commit1b99ff44f9b6286dc5a2fecd8279c2e57404f670 (patch)
tree4c7eb150bfc94dca709078d6549ed71392202e78
parent1b13bb82c9a732cd9d7216e74dab45e782c4f207 (diff)
downloadsnooze-1b99ff44f9b6286dc5a2fecd8279c2e57404f670.tar.gz
snooze-1b99ff44f9b6286dc5a2fecd8279c2e57404f670.tar.xz
snooze-1b99ff44f9b6286dc5a2fecd8279c2e57404f670.zip
fix weekofyear parsing
-W0 is still allowed, but never matches...
-rw-r--r--snooze.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/snooze.c b/snooze.c
index 9a3381a..dfec5c8 100644
--- a/snooze.c
+++ b/snooze.c
@@ -241,7 +241,7 @@ int main(int argc, char *argv[])
 	while ((c = getopt(argc, argv, "+D:W:H:M:S:T:R:d:m:ns:t:vw:")) != -1)
                 switch(c) {
 		case 'D': parse(optarg, dayofyear, sizeof dayofyear, -1); break;
-		case 'W': parse(optarg, weekofyear, sizeof weekofyear, -1); break;
+		case 'W': parse(optarg, weekofyear, sizeof weekofyear, 0); break;
 		case 'H': parse(optarg, hour, sizeof hour, 0); break;
 		case 'M': parse(optarg, minute, sizeof minute, 0); break;
 		case 'S': parse(optarg, second, sizeof second, 0); break;