Function near_day
pub fn near_day(days_from_today: i64) -> Option<String>Expand description
Name a calendar day next to today in the host’s language — Yesterday,
Today, Tomorrow — or None further out, where the caller shows its
own date. days_from_today is negative for the past.
use tilo_ui::format::near_day;
assert_eq!(near_day(0).as_deref(), Some("Today"));
assert_eq!(near_day(-1).as_deref(), Some("Yesterday"));
assert_eq!(near_day(2), None);