Standard library / time

time.Sunday

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

Formal Syntax & Structure

go syntaxgo
const Sunday Weekday = 0

Working Example

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