mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-14 15:01:32 +08:00
12 lines
230 B
TypeScript
12 lines
230 B
TypeScript
const getMinAgo = ({ minutes }: getMinAgoProps): Date => {
|
|
const currentDate = new Date();
|
|
|
|
return new Date(currentDate.getTime() - minutes * 60000);
|
|
};
|
|
|
|
interface getMinAgoProps {
|
|
minutes: number;
|
|
}
|
|
|
|
export default getMinAgo;
|