| DIR: /home/dhnidqcz/jamesakinola.com/wp-content/plugins/extendify/src/Assist/lib/ |
| Current File : //home/dhnidqcz/jamesakinola.com/wp-content/plugins/extendify/src/Assist/lib/recommendations.js |
export const isAtLeastNDaysAgo = (dateString = new Date(), numDays = 0) => {
const siteCreatedDaysAgo = Math.floor(
(new Date() - new Date(dateString)) / (1000 * 60 * 60 * 24),
);
// Account for future time zones by min 0
return Math.max(0, siteCreatedDaysAgo) >= Number(numDays);
};
|