Standard library / time

time.Tuesday

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

Formal Syntax & Structure

go syntaxgo
const Tuesday Weekday = 2

Working Example

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