Documentation
¶
Overview ¶
Package format renders the small values the CLI and the dashboard both print: durations, large counts and a book's metadata line. They live here so `oku timer` and the TUI cannot drift apart, and so neither has to import the other.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BookMeta ¶
BookMeta is the one-line summary under a book: rating, readers, release date and series, in that order, joined by " · ". Parts with no data are omitted, so an unrated book gets a shorter line rather than an empty one.
func Clock ¶
Clock is the time of day a session started, in the reader's own zone: 24-hour, no seconds. Sessions are listed one per row against a date, so the hour is all that distinguishes them.
func DayLabel ¶
DayLabel names the day t falls on, relative to now: "Today", "Yest.", or the date. Both are bucketed to local midnight, so a session at 23:50 and one at 00:10 read as different days even though they are twenty minutes apart, and a session logged late in the evening is not "yesterday" because UTC has already rolled over.
Types ¶
This section is empty.