Make Chinese New Year one day earlier. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 648911603fa175ffa705daed90777acfd97dc5ca | |
parent f91efa01d26679ff5e6c4833f05554cbb287c485 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sun, 11 Feb 2024 12:27:45 +0100 | |
Make Chinese New Year one day earlier. | |
Thanks for the comment, ggg. | |
Diffstat: | |
M chinese-newyear-cronjob | 5 +++-- | |
1 file changed, 3 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/chinese-newyear-cronjob b/chinese-newyear-cronjob | |
@@ -6,15 +6,16 @@ export PATH="$PATH:/home/annna/bin" | |
chinesenewyear="$($HOME/.local/bin/lunar-find 春节 | cut -d: -f2 | cut -c 2-… | |
cnyprior="$(date -d "$chinesenewyear - 1 day" +"%Y-%m-%d")" | |
+cnypriorprior="$(date -d "$chinesenewyear - 2 day" +"%Y-%m-%d")" | |
curdate="$(LANG=C date -I)" | |
-if [ "${curdate}" = "${cnyprior}" ]; | |
+if [ "${curdate}" = "${cnypriorprior}" ]; | |
then | |
annna-say -s "irc.bitreich.org" -c "#bitreich-en" "One day until Chine… | |
countdownd "$(date -d "+ 1 day" -I)" "#bitreich-en" "Chinese New Year" | |
fi | |
-if [ "${curdate}" = "${chinesenewyear}" ]; | |
+if [ "${curdate}" = "${cnyprior}" ]; | |
then | |
annna-say -s "irc.bitreich.org" -c "#bitreich-en" "Today is a Chinese … | |
fi |