Find the last Sunday of each month: Difference between revisions

Content added Content deleted
(→‎{{header|Go}}: Explanation)
Line 525: Line 525:
=={{header|Go}}==
=={{header|Go}}==


This is different from the Go code for [[Last Friday of each month|last Friday]]. It uses the fact that time functions in Go correct for dates: if you enter 32nd of october, Go corrects to 1st of November. So that if 29th of February is corrected to 1st of March, chosen year is not a leap year.
This is different from the Go code for [[Last Friday of each month]]. It uses the fact that time functions in Go correct for dates: if you enter 32nd of october, Go corrects to 1st of November. So that if 29th of February is corrected to 1st of March, chosen year is not a leap year.


<lang Go>
<lang Go>