mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
96399c7112
* feat: filters in plane deploy implemented multi-level dropdown for plane deploy * style: spacing and fonts * feat: plane deploy implemented authentication/theming, created/modified all the required store & services * devL reactions, voting, comments and theme
15 lines
297 B
TypeScript
15 lines
297 B
TypeScript
export const timeAgo = (time: any) => {
|
|
switch (typeof time) {
|
|
case "number":
|
|
break;
|
|
case "string":
|
|
time = +new Date(time);
|
|
break;
|
|
case "object":
|
|
if (time.constructor === Date) time = time.getTime();
|
|
break;
|
|
default:
|
|
time = +new Date();
|
|
}
|
|
};
|