Тема
itd-api / toDate
function toDate(value): Date | null;
Defined in: types/models.ts:654
Разбирает дату API в объект Date.
Date
string | null | undefined
string
null
undefined
Date | null
null, если строки нет или она не разбирается
const created = toDate(post.createdAt);