humaninterface

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package humaninterface provides a human-writable timespan description DSL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plural

func Plural[T interface{ int | int64 }](n T, singular, plural string) string

Types

type Timespan

type Timespan struct {
	T0, T1 time.Time
}

func MakeTimespan

func MakeTimespan(t0, t1 time.Time) Timespan

func Parse

func Parse(now time.Time, timespandescription string) (Timespan, error)

func (Timespan) Equal

func (ts Timespan) Equal(other Timespan) bool

func (Timespan) Includes

func (ts Timespan) Includes(t time.Time) bool

func (Timespan) String

func (ts Timespan) String() string

Jump to

Keyboard shortcuts

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