Documentation
¶
Overview ¶
Package ui formats values for display in user interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RelativeTime ¶
type RelativeTime struct {
// DateAfter is how far in the past a time must be to show as a date
// instead of a relative time. Zero means seven days.
DateAfter time.Duration
// DateLayout is the time.Format layout for dates. Empty means "2 Jan 2006".
DateLayout string
// Location is the time zone dates are shown in. Nil means time.Local.
Location *time.Location
// Zero is the text for the zero time, such as "never".
Zero string
}
RelativeTime formats past times relative to now, the way a person reads them: "just now", "5m ago", "3h ago", "2d ago", and then a date once the time is DateAfter or more in the past. The zero value is ready to use.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package gio fills gaps in Gio's widgets: Ctrl-modified word motion and deletion for editors, and mouse wheel scrolling by whole notches.
|
Package gio fills gaps in Gio's widgets: Ctrl-modified word motion and deletion for editors, and mouse wheel scrolling by whole notches. |