MCPcopy Create free account
hub / github.com/arctic-cli/interface / todayTimeOrDateTime

Function todayTimeOrDateTime

packages/arctic/src/util/locale.ts:18–29  ·  view source on GitHub ↗
(input: number)

Source from the content-addressed store, hash-verified

16 }
17
18 export function todayTimeOrDateTime(input: number): string {
19 const date = new Date(input)
20 const now = new Date()
21 const isToday =
22 date.getFullYear() === now.getFullYear() && date.getMonth() === now.getMonth() && date.getDate() === now.getDate()
23
24 if (isToday) {
25 return time(input)
26 } else {
27 return datetime(input)
28 }
29 }
30
31 export function number(num: number): string {
32 if (num >= 1000000) {

Callers

nothing calls this directly

Calls 2

datetimeFunction · 0.85
timeFunction · 0.70

Tested by

no test coverage detected