Day of the week: Difference between revisions

added Go
m (→‎{{header|PowerShell}}: using Get-Date instead of a cast which reads nicer, imho)
(added Go)
Line 410:
Output
25th of December is a Sunday in 2011 2016 2022 2033 2039 2044 2050 2061 2067 2072 2078 2089 2095 2101 2107 2112 2118
 
=={{header|Go}}==
<lang go>package main
import "fmt"
import "time"
 
func main() {
for year := int64(2008); year <= 2121; year++ {
mytime := &time.Time{ Year:year, Month:12, Day:25 }
seconds := mytime.Seconds()
mytime = time.SecondsToUTC(seconds)
if mytime.Weekday == time.Sunday {
fmt.Printf("25 December %d is Sunday\n", year)
}
}
}</lang>
 
=={{header|Groovy}}==
Anonymous user