From 0a688fc057d1e07f696a2230695cc3a1ac1dcffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Mon, 27 Mar 2023 17:35:13 +0200 Subject: [PATCH] Simple period comments display. --- member-print.scm | 6 ++++-- period.scm | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/member-print.scm b/member-print.scm index bfa935e..e674667 100644 --- a/member-print.scm +++ b/member-print.scm @@ -110,8 +110,10 @@ (map (lambda (p) (list - (month->string (period-since p)) - (month->string (period-before p)))) + (string-append (month->string (period-since p)) " " + (or (period-scomment p) "")) + (string-append (month->string (period-before p)) " " + (or (period-bcomment p) "")))) v)) #:col-border #t))) (else diff --git a/period.scm b/period.scm index d4ff340..45b8753 100644 --- a/period.scm +++ b/period.scm @@ -30,6 +30,8 @@ ( period-since period-before + period-scomment + period-bcomment period-markers->periods periods-duration month-in-periods? @@ -81,7 +83,7 @@ (if (null? l) (list #t (if cb - (reverse (cons (make-period cb #f) ps)) + (reverse (cons (make-period (car cb) #f (cadr cb)) ps)) (reverse ps)) "" -1) @@ -99,11 +101,11 @@ (if (eq? mtype rmt) (if cb (loop (cdr l) - (cons (make-period cb month) ps) + (cons (make-period (car cb) month (cadr cb) comment) ps) #f) (loop (cdr l) ps - month)) + (list month comment))) (list #f (reverse ps) (sprintf "Invalid start/stop sequence marker ~A" marker)