mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
cd5e5b96da
* feat: init mobx and issue filter * feat: Implemented list and kanban views in plane space and integrated mobx. * feat: updated store type check
14 lines
341 B
TypeScript
14 lines
341 B
TypeScript
export const renderDateFormat = (date: string | Date | null) => {
|
|
if (!date) return "N/A";
|
|
|
|
var d = new Date(date),
|
|
month = "" + (d.getMonth() + 1),
|
|
day = "" + d.getDate(),
|
|
year = d.getFullYear();
|
|
|
|
if (month.length < 2) month = "0" + month;
|
|
if (day.length < 2) day = "0" + day;
|
|
|
|
return [year, month, day].join("-");
|
|
};
|