Skip to content

Instantly share code, notes, and snippets.

@torarvid
Created November 18, 2022 10:15
Show Gist options
  • Save torarvid/34cc81e507c53e2a9989a7dd099d32ba to your computer and use it in GitHub Desktop.
Save torarvid/34cc81e507c53e2a9989a7dd099d32ba to your computer and use it in GitHub Desktop.
Generate some Slack reminders about social stuff
package main
import (
"fmt"
"time"
)
var msg = "/remind #logistics-platform-picking-automation \"Hi there, " +
"@logistics-picking-automation-team. Been working hard lately? Do you think it's about time " +
"that you and your team members chill out and do something social in the next week or two? " +
"If so, please react with a 👍 to this message.\" on %s %d\n"
func main() {
for m := 1; m <= 12; m++ {
month := (time.Now().Month() + time.Month(m))
for day := 1; day <= 7; day++ {
date := time.Date(time.Now().Year(), month, day, 0, 0, 0, 0, time.UTC)
if date.Weekday() == time.Wednesday {
fmt.Printf(msg, date.Month(), date.Day())
break
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment