Standard library / time

time.Monday

Named weekday constant representing Monday; numeric value 1. Prefer the name to a magic number. Expected stdout: 'Monday 1\n'.

Formal Syntax & Structure

go syntaxgo
const Monday Weekday = 1

Working Example

Example Snippetgo
package main
import (  "fmt"  "time")
func main() { fmt.Println(time.Monday, int(time.Monday)) }
Go Reference