datetime

package
v0.0.0-...-75b01c0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndOfDay

func EndOfDay(t time.Time) time.Time

func EndOfMonth

func EndOfMonth(t time.Time) time.Time

func FormatAsDateTime

func FormatAsDateTime(t time.Time) string

FormatAsDateTime formats a given time.Time value into a string representation in the format "YYYY-MM-DD HH:MM:SS" based on the current local time zone

func Hours

func Hours(hours int, end time.Time) iter.Seq[Hour]

func ParseAsDateTime

func ParseAsDateTime(tt string) time.Time

ParseAsDateTime parses a string representation of date and time in the format "YYYY-MM-DD HH:MM:SS" into a time.Time value based on the local time zone

func StartOfDay

func StartOfDay(t time.Time) time.Time

func StartOfMonth

func StartOfMonth(t time.Time) time.Time

Types

type Hour

type Hour struct {
	Start time.Time
	End   time.Time
}

Jump to

Keyboard shortcuts

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