time.Month.String() Function in Golang With Examples Last Updated : 21 Apr, 2020 Comments Improve Suggest changes Like Article Like Report In Go language, time packages supplies functionality for determining as well as viewing time. The Month.String() function in Go language is used to find the English name of the month. Moreover, this function is defined under the time package. Here, you need to import the "time" package in order to use these functions. Syntax: func (m Month) String() string Here, "m" is the type Month. Return Value: It returns a string which is the English name of the month. Example 1: C // Golang program to illustrate the usage of // (Month) String() function // Including main package package main // Importing fmt and time import "fmt" import "time" // Calling main func main() { // Calling time.Month // with its parameter // of type int var m = time.Month(2) // Prints the English // name of the month fmt.Println(m.String()) } Output: February Example 2: C // Golang program to illustrate the usage of // (Month) String() function // Including main package package main // Importing fmt and time import "fmt" import "time" // Calling main func main() { // Calling time.Month // with its parameter // of type int var m = time.Month(12) // Prints the English name of // the month fmt.Println(m.String()) } Output: December Comment More infoAdvertise with us Next Article time.Month.String() Function in Golang With Examples N nidhi1352singh Follow Improve Article Tags : Go Language GoLang-time Similar Reads time.Time.Month() Function in Golang With Examples In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Month() function in Go language is used to find the month of the year as provided by t. Moreover, this function is defined under the time package. Here, you need to import the "time" package in ord 2 min read time.String() Function in Golang With Examples In Go language, time packages supplies functionality for determining as well as viewing time. The String() function in Go language is used to find a string that represents the duration formats as "24h6m0.7s". Here, the foremost zero units are deleted. And the stated duration with less than one-secon 2 min read time.Location.String() Function in Golang With Examples In Go language, time packages supplies functionality for determining as well as viewing time. The Location.String() function in Go language is used to find an explanatory name stated for the data of time zone which is equivalent to the name parameter passes to the LoadLocation or FixedZone method. M 2 min read time.Time.String() Function in Golang With Examples In Go language, time packages supplies functionality for determining as well as viewing time. The Time.String() function in Go language is used to yield the time which is formatted with the help of the format string. Moreover, this function is defined under the time package. Here, you need to import 2 min read time.Time.Minute() Function in Golang With Examples In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Minute() function in Go language is used to find the minute offset within the stated hour that is provided by "t" and the range is [0, 59]. Moreover, this function is defined under the time package 2 min read Like