mirror of
https://github.com/karl0ss/JDRssDownloader.git
synced 2025-04-27 20:03:40 +01:00
23 lines
540 B
JavaScript
23 lines
540 B
JavaScript
const fs = require('fs');
|
|
config = JSON.parse(fs.readFileSync('config.json'))
|
|
var moment = require('moment');
|
|
|
|
function returnUpdatedDate(date, offset) {
|
|
var newDate = moment(date);
|
|
newDate.add(offset, 'm');
|
|
return new moment(newDate).format("ddd, LTS")
|
|
}
|
|
|
|
function nextRssRefresh() {
|
|
return returnUpdatedDate(global.rssRefreshTime, config.RSSFeedRefreshMins)
|
|
}
|
|
|
|
function nextLinkCheck() {
|
|
return returnUpdatedDate(global.linkCheckTime, config.JDPostLinksMins)
|
|
}
|
|
|
|
module.exports = {
|
|
nextRssRefresh, nextLinkCheck
|
|
}
|
|
|