netz39 / istheuteplenum

Small html-site displaying plenum-status
http://istheuteplenum.netz39.de/
2 stars 2 forks source link

meeting-reminder: Always evaluate week number as decimal #11

Closed LeSpocky closed 6 months ago

LeSpocky commented 6 months ago

In early weeks of the year date -d "next Wednesday" "+%V" returns a number of the form 01..09 which bash interprets as oktal number (base 8). Instead of stripping the leading zero we explicitly evaluate with base 10 aka decimal in the arithmetic expression now.

Error output before was something like this for example:

08: value too great for base (error token is "08")

Link: https://stackoverflow.com/a/11130324 Link: https://www.gnu.org/software/bash/manual/html_node/Shell-Arithmetic.html

MG-5 commented 6 months ago

Danke für den PR!