Documentation
¶
Index ¶
- func ParseDate(input string, dateFormat string) (time.Time, error)
- func ParseDueDate(s string) (time.Time, error)
- func ParseDueDateSimple(s string) time.Time
- func RenderMarkdown(content string, width int, style string) (string, error)
- func TruncateString(s string, maxWidth int) string
- func WrapByWidth(s string, maxWidth int) []string
- type Styles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseDate ¶ added in v0.5.0
ParseDate parses flexible date inputs for daily notes. Supports: "today", "yesterday", "tomorrow", "+N", "-N", ISO date format.
func ParseDueDate ¶
ParseDueDate parses flexible date formats for task due dates. Supports:
- "today", "tomorrow", "tom"
- "+N" (N days from today)
- "2006-01-02" (ISO format)
- "01-02", "01/02", "1/2" (current year)
func ParseDueDateSimple ¶
ParseDueDateSimple parses date without returning an error (returns zero time on failure). Used in TUI where we don't need detailed error messages.
func RenderMarkdown ¶ added in v0.6.0
RenderMarkdown renders markdown content with ANSI styling for terminal output. Falls back to raw content on error.
func TruncateString ¶
TruncateString truncates a string to fit within maxWidth, adding "..." suffix if truncated. Properly handles wide characters.
func WrapByWidth ¶
WrapByWidth wraps a string into multiple lines based on display width. Properly handles wide characters (CJK).
Types ¶
type Styles ¶
type Styles struct {
Title lipgloss.Style
Selected lipgloss.Style
Normal lipgloss.Style
Done lipgloss.Style
Meta lipgloss.Style
Help lipgloss.Style
Empty lipgloss.Style
PriorityHigh lipgloss.Style
PriorityMedium lipgloss.Style
PriorityLow lipgloss.Style
DoneSection lipgloss.Style
}
Styles holds common TUI styles.