X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=newdate.sh;h=b71bdef063fb6679681cebd533222e7ab4e55e73;hb=ddc3a72474bbaf0fad5edb200e4e78815537d52e;hp=32533b8090b17dce35e21e194134e836e437a1bb;hpb=36247cc4c321b0f3b884a673428598a6c8818d27;p=webpoll diff --git a/newdate.sh b/newdate.sh index 32533b8..b71bdef 100755 --- a/newdate.sh +++ b/newdate.sh @@ -25,11 +25,13 @@ fs_timeofday() { } fs_splittimes() { - local day times time c + local days day times time c + days="$(DBM "$file" get dates)" cat <<-EOF [fieldset .splittimes [checkbox "none" "none" .splittimes checked disabled=disabled] [submit "splittimes" "no" Separate Time Options per Day] - $(for day in $(DBM "$file" get dates); do + $([ ! "$days" ] && printf '[p You have not selected any days yet.]\n') + $(for day in $days; do date -d $day +"[h2 . %A - %B %_d, %Y]" times=$(DBM "$file" get "tod_$day") for time in ${times:--}; do