MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / formatDate

Function formatDate

web/packages/shared/util/time.ts:13–13  ·  view source on GitHub ↗
(time: MomentInput, format = 'YYYY-MM-DD')

Source from the content-addressed store, hash-verified

11 * @returns 格式化日期字符串
12 */
13export const formatDate = (time: MomentInput, format = 'YYYY-MM-DD') => (time ? Moment(time).format(format) : null);
14
15/**
16 * 格式化time为时间字符串

Callers 2

getItemFunction · 0.90
formatDateTimeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected