跳到主要内容

formatDateToYmd()

function formatDateToYmd(date): string;

Defined in: packages/rxdb-model/src/query-builder/utils/date.ts:7

将日期格式化为 YYYY-MM-DD 字符串。

Parameters​

ParameterTypeDescription
datestring | Date | null | undefined要格式化的日期(Date 对象或可解析的日期字符串)

Returns​

string

YYYY-MM-DD 格式的日期字符串;输入为空值或无法解析时返回空字符串