X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=poll.sh;h=8e55600ed85ecabf7b766e88f6e930cbd415c64a;hb=HEAD;hp=7ab0e9d58dea7414449584d78dc0046e9fcb48b9;hpb=3e2891dc8977ca761cf55c82cbb01af874238217;p=webpoll
diff --git a/poll.sh b/poll.sh
index 7ab0e9d..8e55600 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