summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bin/when.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/when.y b/bin/when.y
index 5367b3b3..d647d193 100644
--- a/bin/when.y
+++ b/bin/when.y
@@ -138,7 +138,12 @@ static void printScalar(struct tm scalar) {
 	} else if (scalar.tm_mday) {
 		printf("%dw ", scalar.tm_mday / 7);
 	}
-	if (scalar.tm_yday && scalar.tm_mon) printf("(%dd) ", scalar.tm_yday);
+	if (scalar.tm_yday && scalar.tm_mon) {
+		if (scalar.tm_yday % 7 == 0) {
+			printf("(%dw) ", scalar.tm_yday / 7);
+		}
+		printf("(%dd) ", scalar.tm_yday);
+	}
 	printf("\n");
 }
 
5b80&follow=1'>Add Fomapan 200 to films listJune McEnroe 2024-09-10Add August 29 picnic photosJune McEnroe 2024-09-08Apply some bold to trips renderingJune McEnroe This seems easier to visually scan. The only other thing I'd like is a nicer date rendering but JavaScript is useless for that. 2024-09-08Render trips hopefully more efficientlyJune McEnroe 2024-09-08Allow removing bodies and lensesJune McEnroe 2024-09-08Limit body width so it looks less silly on desktopJune McEnroe 2024-09-07Handle no film being loadedJune McEnroe 2024-09-07Fancy up the text a littleJune McEnroe