20 lines
365 B
Go
20 lines
365 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
"strconv"
|
|
"time"
|
|
)
|
|
|
|
func daysIn(m int, year int, w http.ResponseWriter) {
|
|
var data string
|
|
dni := time.Date(year, time.Month(m+1),0,0,0,0,0,time.UTC)
|
|
|
|
for i := 1; i <= dni.Day(); i++ {
|
|
data = strconv.Itoa(year) + "-" + strconv.Itoa(int(m)) + "-" + strconv.Itoa(i)
|
|
fmt.Println("data: ", data)
|
|
addRow(data, w)
|
|
|
|
}
|
|
} |