timeutil

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package timeutil provides time and date helpers.

Index

Constants

View Source
const DateLayout = "2006-01-02"

DateLayout matches the canonical date format used in configuration files.

Variables

This section is empty.

Functions

func DateAt

func DateAt(t time.Time) time.Time

DateAt normalizes a time to midnight in its location.

func DaysBetween

func DaysBetween(start, end time.Time) int

DaysBetween returns the number of whole days between start and end.

func FormatDate

func FormatDate(date *time.Time) string

FormatDate returns a formatted date or an empty string for nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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