mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-28 23:27:08 -04:00
New: Project Aphrodite
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import moment from 'moment';
|
||||
|
||||
function isBefore(date, offsets = {}) {
|
||||
if (!date) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const offsetTime = moment();
|
||||
|
||||
Object.keys(offsets).forEach((key) => {
|
||||
offsetTime.add(offsets[key], key);
|
||||
});
|
||||
|
||||
return moment(date).isBefore(offsetTime);
|
||||
}
|
||||
|
||||
export default isBefore;
|
||||
Reference in New Issue
Block a user