When printing weekly calendars, start from the right date.

This commit is contained in:
Dianne Skoll
2026-01-10 10:54:50 -05:00
parent e2f786580c
commit 9418043bb6

View File

@@ -1820,15 +1820,17 @@ proc DoPrintHelper {} {
set p $PSCmd
if {"$Option(View)" == "Month"} {
set p [regsub %WEEKS% $PSCmd ""]
set sd 1
} else {
set p [regsub %WEEKS% $PSCmd "+[get_num_weeks]"]
set sd $CurDay
}
if {$Option(PrintFormat) == "pdf"} {
set p [regsub %EXTRA% $p "-itkpdf=1 $Option(ExtraRemindArgs)"]
set cmd "$p 1 [lindex $MonthNames $CurMonth] $CurYear | $Rem2PDF --weeks-per-page=[get_num_weeks]"
set cmd "$p $sd [lindex $MonthNames $CurMonth] $CurYear | $Rem2PDF --weeks-per-page=[get_num_weeks]"
} else {
set p [regsub %EXTRA% $p "-itkpdf=1 $Option(ExtraRemindArgs)"]
set cmd "$p 1 [lindex $MonthNames $CurMonth] $CurYear | $Rem2PDF --ps --weeks-per-page=[get_num_weeks]"
set cmd "$p $sd [lindex $MonthNames $CurMonth] $CurYear | $Rem2PDF --ps --weeks-per-page=[get_num_weeks]"
}
if {$Option(PrintSize) == "letter"} {
append cmd " --media=Letter"