time

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextDay

func NextDay(hour, minute int) time.Time

NextDayOf now

func NextDayOf

func NextDayOf(from time.Time, hour, minute int) time.Time

This function calculates the time for the next occurrence of the specified hour and minute within a day.

hour is an integer representing the desired hour (0-23). minute is an integer representing the desired minute (0-59). Return A time.Time object representing the date and time for the next occurrence of the specified hour and minute.

func SleepContext added in v0.0.6

func SleepContext(ctx context.Context, duration time.Duration) bool

Sleep until ctx done or timeout return false if ctx is Done

func Today added in v0.2.3

func Today() time.Time

Today returns the current date with the time set to midnight (00:00:00) in the current location.

func UntilNextDay added in v0.0.6

func UntilNextDay(hour, minute int) time.Duration

Types

This section is empty.

Jump to

Keyboard shortcuts

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