Day of the week: Difference between revisions

Content added Content deleted
(→‎{{header|Vlang}}: fixed example to handle option return from time.parse, so that it could compile)
Line 4,619: Line 4,619:


=={{header|Vlang}}==
=={{header|Vlang}}==
<lang go>
<lang vlang>import time
import time


fn main() {
fn main() {
for y := 2008; y <= 2121; y++ {
for y := 2008; y <= 2121; y++ {
if time.parse('${y}-12-25 00:00:00').day_of_week() == 7 {
d := time.parse('${y}-12-25 00:00:00') or {
continue
println('December 25 ${y} is a Sunday')
}
}
if d.day_of_week() == 7 {
}
println('December 25 ${y} is a Sunday')
}
}
</lang>
}
}</lang>


{{out}}
{{out}}