Last active
October 18, 2024 22:14
-
-
Save icasimpan/34727d89ecd62afc1589eb38cefce0f2 to your computer and use it in GitHub Desktop.
golang: getting today's week number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "time" | |
func main() { | |
var time_now time.Time = time.Now() // [ALTERNATIVE] time_now := time.Now() | |
var _, wk_num = time_now.ISOWeek() // [ALTERNATIVE] _, wk_num := time_now.ISOWeek() | |
fmt.Println(wk_num) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment