Standard library / time

time.April

Named month constant representing April; numeric value 4. Prefer the name to a magic number. Expected stdout: 'April 4\n'.

Formal Syntax & Structure

go syntaxgo
const April Month = 4

Working Example

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