Documentation
¶
Index ¶
- Constants
- func ColoredPastDue(dueDate *time.Time, completed bool) string
- func FormatDate(t *time.Time) string
- func GetPriorityString(priority int) string
- func ParseDueDate(dueDateStr string) (*time.Time, error)
- func ParseIntOrError(value string) (int, error)
- func WrapText(text string, maxLength int) string
Constants ¶
View Source
const ( PriorityHigh = 1 PriorityMedium = 2 PriorityLow = 3 PriorityNone = 4 )
Constants for wrapping text and priority values.
Variables ¶
This section is empty.
Functions ¶
func ColoredPastDue ¶
ColoredPastDue returns a colored string depending on the due date.
func FormatDate ¶
FormatDate formats a time.Time object into a human-readable string in the format "YYYY-MM-DD HH:MM".
func GetPriorityString ¶
GetPriorityString returns the string representation of a Priority value.
func ParseDueDate ¶
ParseDueDate parses a date string in the format "2006-01-02 15:04" and returns a pointer to time.Time.
func ParseIntOrError ¶
ParseIntOrError tries to parse a string as an integer and returns an error if the parsing fails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.