Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "time"
- )
- func main() {
- now := time.Now().Weekday()
- switch now {
- case time.Monday:
- fallthrough
- case time.Tuesday:
- fallthrough
- case time.Thursday:
- fmt.Println("Week")
- case time.Wednesday:
- fmt.Println("Hump day")
- case time.Friday:
- fmt.Println("Thank God It's Friday")
- case time.Saturday:
- fallthrough
- case time.Sunday:
- fmt.Println("Weekend")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement