MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / format

Function format

packages/utilities/src/date.ts:7–9  ·  view source on GitHub ↗
(date: string, pattern: string = 'p')

Source from the content-addressed store, hash-verified

5import formatDistanceToNow from 'date-fns/formatDistanceToNow';
6
7export function format(date: string, pattern: string = 'p'): string {
8 return formatDate(new Date(date), pattern);
9}
10
11export function timestamp() {
12 return new Date().getTime();

Callers 4

DescriptionFunction · 0.90
MatrixViewFunction · 0.90
LeftFunction · 0.90
RowFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected