mirror of
https://github.com/ow-mods/ow-mod-db.git
synced 2025-12-11 20:15:24 +01:00
9 lines
234 B
TypeScript
9 lines
234 B
TypeScript
const dayInMilliseconds = 1000 * 60 * 60 * 24;
|
|
|
|
export function happenedWithinDayCount(dateText: string, dayCount: number) {
|
|
return (
|
|
new Date().valueOf() - new Date(dateText).valueOf() <
|
|
dayCount * dayInMilliseconds
|
|
);
|
|
}
|