timeutils

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Overview

Package timeutils defines functions to close the gaps present in Golang's default implementation of Time.

Package timeutils defines functions to close the gaps present in Golang's default implementation of Time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocalMidnight

func LocalMidnight(t time.Time) time.Time

LocalMidnight returns the local midnight of the given time.

func Midnight

func Midnight(t time.Time) time.Time

Midnight returns the midnight of the given time.

func SubtractDays added in v0.16.0

func SubtractDays(t time.Time, days uint) time.Time

SubtractDays subtracts the specified number of days from the given time.

func UTCMidnight

func UTCMidnight(t time.Time) time.Time

UTCMidnight converts the given time to UTC, and returns the UTC time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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