Skip to content

Commit

Permalink
Fix calculation of DoW
Browse files Browse the repository at this point in the history
The first week of a year (per ISO) is the first week containing a Thursday. %V calculates this.

Exchange two bits to fix this problem.
  • Loading branch information
penguineer authored Jan 15, 2024
1 parent 0cbbfdf commit 3461826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/meeting-reminder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
echo "next_date=$next_date" >> "$GITHUB_OUTPUT"
echo "next_date_iso=$next_date_iso" >> "$GITHUB_OUTPUT"
echo "next_date_year=$next_date_year" >> "$GITHUB_OUTPUT"
next_date_week=$(date -d "next Wednesday" "+%U")
next_date_week=$(date -d "next Wednesday" "+%V")
if [[ $(($next_date_week % 3)) != 0 ]];
then
echo "::notice::Wrong week, skip sending reminder."
Expand Down

0 comments on commit 3461826

Please sign in to comment.