You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import moment from 'moment';
|
|
|
|
function isAfter(date, offsets = {}) {
|
|
if (!date) {
|
|
return false;
|
|
}
|
|
|
|
const offsetTime = moment();
|
|
|
|
Object.keys(offsets).forEach((key) => {
|
|
offsetTime.add(offsets[key], key);
|
|
});
|
|
|
|
return moment(date).isAfter(offsetTime);
|
|
}
|
|
|
|
export default isAfter;
|