timeutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DateOnlyString

func DateOnlyString(value string) string

func ParseAPI

func ParseAPI(s string) (time.Time, bool)

ParseAPI parses timestamp strings returned by the Life@USTC API.

func ParseUserDateTime

func ParseUserDateTime(raw string, endOfDay bool) (time.Time, error)

ParseUserDateTime accepts a full RFC3339 timestamp or a YYYY-MM-DD date. Date-only values are interpreted in UTC (not local time). This ensures --before 2025-06-01 consistently means "before end of June 1 UTC", which matches the API's server-side filtering. If endOfDay is true, date-only values resolve to the last nanosecond of that day.

Types

This section is empty.

Jump to

Keyboard shortcuts

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