mirror of
https://github.com/taigrr/gico.git
synced 2026-04-02 03:09:07 -07:00
print out 4 years
This commit is contained in:
@@ -13,11 +13,13 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
GetYear()
|
||||
year := time.Now().Year()
|
||||
for i := year - 4; i <= year; i++ {
|
||||
GetYear(i)
|
||||
}
|
||||
}
|
||||
|
||||
func GetYear() {
|
||||
year := time.Now().Year()
|
||||
func GetYear(year int) {
|
||||
yearLength := 365
|
||||
if year%4 == 0 {
|
||||
yearLength++
|
||||
|
||||
Reference in New Issue
Block a user