MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / greetingFor

Function greetingFor

packages/app-core/src/components/HomeView.tsx:23–28  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

21const NO_COLLAPSE = { today: false, upcoming: false, waiting: false, done: false }
22
23function greetingFor(date: Date): string {
24 const h = date.getHours()
25 if (h < 12) return 'Good morning'
26 if (h < 18) return 'Good afternoon'
27 return 'Good evening'
28}
29
30/** Compact "edited 3h ago" style stamp; falls back to a short date past a week. */
31function timeAgo(ts: number, now: number): string {

Callers 1

HomeViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected