X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=poll.sh;h=240a155d26bc5378b6ef8cfff8a23d87466a8642;hb=2fa0a232ede0b9986be5a07c5de4239e4c7a67af;hp=7ab0e9d58dea7414449584d78dc0046e9fcb48b9;hpb=6450e6e1debb25bfda232e3d001a4da51e1cb72c;p=webpoll diff --git a/poll.sh b/poll.sh index 7ab0e9d..240a155 100644 --- a/poll.sh +++ b/poll.sh @@ -1,6 +1,7 @@ #!/bin/sh . "${_EXEC}/comments.sh" +. "${_EXEC}/languages.sh" id="$(checkid "${PATH_INFO#/}")" file="${_DATA}/${id}" @@ -74,6 +75,8 @@ table_poll() { local edit="$(GET edit)" local time date span name yes no maybe yc nc mc + table_date="${table_date+"%A
%B %_d, %Y"}" + [ "$timelist" ] || return 1 printf '[table .poll [thead\n' @@ -84,7 +87,7 @@ table_poll() { span=0; for time in $timelist; do case $time in ${date}*) span=$((span + 1));; esac; done - date -d "$date" +"[th colspan=\"${span}\" . %A
%B %_d, %Y]"; + date -d "$date" +"[th colspan=\"${span}\" . ${table_date}]"; done printf '[th]]\n' fi