Standard library / time

time.Duration.Minutes()

Express duration as floating-point minutes. Expected stdout: '1.5\n'.

Formal Syntax & Structure

go syntaxgo
func (d Duration) Minutes() float64

Return Value

float64

Express duration as floating-point minutes.

Working Example

Example Snippetgo
package main
import (  "fmt"  "time")
func main() { fmt.Println((90 * time.Second).Minutes()) }
Go Reference