utils

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDuration = 1 * time.Hour

Functions

func ComputeFields added in v0.0.6

func ComputeFields(t *types.Task)

ComputeFields populates all computed fields on a task before output.

func FuzzySelectProject

func FuzzySelectProject(projects []types.Project, query string) (types.Project, error)

func FuzzySelectTask

func FuzzySelectTask(tasks []types.Task, projectColor project.Color, query string) (types.Task, error)

func GetProjectDescription

func GetProjectDescription(project types.Project) string

func GetTaskDescription

func GetTaskDescription(task types.Task, projectColor project.Color) string

func LoadClient

func LoadClient() (api.Client, error)

func ParseFlexibleTime added in v0.0.6

func ParseFlexibleTime(value string) (time.Time, error)

ParseFlexibleTime parses ISO 8601 timestamps, accepting both +00:00 and +0000 offset formats.

func ParseTimeExpression

func ParseTimeExpression(expr string) (*naturaltime.Range, error)

func PrintProjectsSimple added in v0.0.6

func PrintProjectsSimple(projects []types.Project)

PrintProjectsSimple writes tab-separated project data to stdout for non-interactive use.

func PrintTasksSimple added in v0.0.6

func PrintTasksSimple(tasks []types.Task)

PrintTasksSimple writes tab-separated task data to stdout for non-interactive use.

func TruncateToDate added in v0.0.6

func TruncateToDate(t time.Time) time.Time

TruncateToDate strips the time component, keeping only the date at midnight.

Types

This section is empty.

Jump to

Keyboard shortcuts

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