utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeFeedName

func NormalizeFeedName(title string) string

NormalizeFeedName converts a feed title to a URL-safe normalized name Converts to lowercase, replaces spaces with '-', and special chars with '_'

func ParseDayUTC

func ParseDayUTC(s string) (start, end time.Time, err error)

ParseDayUTC parses a single-day selector into a [start, end) window covering that whole day in UTC (midnight to midnight). Accepts "YYYY-MM-DD", "today", or "yesterday". For the "today"/"yesterday" shortcuts the calendar date is taken from local time, while the returned window is still UTC.

func ParseTimeString

func ParseTimeString(s string) (time.Time, error)

ParseTimeString parses a user-friendly time string into a time.Time Supported formats:

  • "now" - current time
  • RFC3339: "2006-01-02T15:04:05Z07:00"
  • Date: "2006-01-02"
  • Relative: "7d", "2h", "30m" or "-7d", "-2h", "-30m" (days, hours, minutes ago)

Types

This section is empty.

Jump to

Keyboard shortcuts

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