timeutil

package
v1.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetElapsedMinsInThisDay

func GetElapsedMinsInThisDay(currentTime time.Time) int

GetElapsedMinsInThisDay() returns no of minutes elapsed in this day for the time provided

func MinsOfDay

func MinsOfDay(str string) int

MinsOfDay returns minutes since start of day for a timestamp in format `15:30` eg. MinsOfDay("02:30") -> 150 returns 0 for a timestamp not in format HH:MM

func Now

func Now() time.Time

Now returns the current time in UTC.

func StartOfDay

func StartOfDay(t time.Time) time.Time

StartOfDay returns start of the day

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL