timeutil

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: GPL-2.0, GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package timeutil parses time-shaped strings used across the app (currently HH:MM schedule times). Named package — do NOT rename to util/helpers/common. As the app accretes more time-domain helpers (relative-duration parsing, timezone coercion, etc.) they belong here, not in a generic bucket.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseHHMM

func ParseHHMM(raw string) (hour, minute int, ok bool)

ParseHHMM parses "HH:MM" into (hour, minute). Returns ok=false if the input doesn't match or the values are out of range (hour 0-23, minute 0-59, input must be exactly "HH:MM" with a single colon).

Single source of truth for HH:MM parsing across the app. Consumers: validateScheduleTime (config load) and scheduler.Run (daily tick).

Types

This section is empty.

Jump to

Keyboard shortcuts

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