Code snippets with tests and testable examples for the Go programming language
package main import ( "fmt" "time" ) func Example() { // The time package offers a time.Weekday() method which returns // a time.Weekday value https://pkg.go.dev/time?tab=doc#Weekday now := time.Now() if now.Weekday() == time.Tuesday { fmt.Println("The day on Go playground is always Tuesday") } // Output: // The day on Go playground is always Tuesday }
by psampaz - source code - comment below or here