relativeAndClock static method

String relativeAndClock(
  1. int timestamp, {
  2. DateTime? now,
})

2 分钟前 · 14:03:22 — freshness and the exact instant, side by side, so the reader can both judge recency and line the record up against a log.

Implementation

static String relativeAndClock(int timestamp, {DateTime? now}) =>
    '${relative(timestamp, now: now)} · ${clock(timestamp)}';