time.Time.Minute() 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 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. Here, you need to import the "time" package in order to use these functions. Syntax: func (t Time) Minute() int Here, "t" is the stated time. Return Value: It returns the minute offset within the stated hour that is provided by "t". Example 1: C // Golang program to illustrate the usage of // Time.Minute() function // Including main package package main // Importing fmt and time import "fmt" import "time" // Calling main func main() { // Declaring t in UTC t := time.Date(2019, 6, 5, 11, 35, 04, 0, time.UTC) // Calling Minute method min := t.Minute() // Prints minute as specified fmt.Printf("The stated minute within"+ " the hour specified is: %v\n", min) } Output: The stated minute within the hour specified is: 35 Example 2: C // Golang program to illustrate the usage of // Time.Minute() function // Including main package package main // Importing fmt and time import "fmt" import "time" // Calling main func main() { // Declaring t in UTC t := time.Date(2019, 6, 5, 11, 91, 04, 0, time.UTC) // Calling Minute method min := t.Minute() // Prints minute as specified fmt.Printf("The stated minute within"+ " the hour specified is: %v\n", min) } Output: The stated minute within the hour specified is: 31 Here, the stated minute is out of usual range but it is normalized while conversion. Comment More infoAdvertise with us Next Article time.Time.Minute() Function in Golang With Examples N nidhi1352singh Follow Improve Article Tags : Go Language GoLang-time Similar Reads time.Time.In() Function in Golang with Examples In Go language, time packages supplies functionality for determining as well as viewing time. The In() function in Go language is used to find a copy of the stated "t" that represents the identical time instant, but along with the copy's location data that is set to "loc" for display uses. And if "l 2 min read 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.Minutes() Function in Golang With Examples In Go language, time packages supplies functionality for determining as well as viewing time. The Minutes() function in Go language is used to find the duration of time in the form of a floating-point number of minutes. Moreover, this function is defined under the time package. Here, you need to imp 2 min read time.Time.Sub() Function in Golang With Examples In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Sub() function in Go language is used to yield the duration obtained by performing the operation t-u. And if the output here surpasses the maximum or the minimum value that can be stored in a Durat 2 min read time.NewTimer() Function in Golang With Examples In Go language, time packages supplies functionality for determining as well as viewing time. The NewTimer() function in Go language is used to create a new Timer that will transmit the actual time on its channel at least after duration "d". Moreover, this function is defined under the time package. 2 min read Like