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() {
|
func main() {
|
||||||
GetYear()
|
year := time.Now().Year()
|
||||||
|
for i := year - 4; i <= year; i++ {
|
||||||
|
GetYear(i)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetYear() {
|
func GetYear(year int) {
|
||||||
year := time.Now().Year()
|
|
||||||
yearLength := 365
|
yearLength := 365
|
||||||
if year%4 == 0 {
|
if year%4 == 0 {
|
||||||
yearLength++
|
yearLength++
|
||||||
|
|||||||
Reference in New Issue
Block a user