fent / node-feedsub

Subscribes to RSS/Atom/JSON feeds and notifies on new items.
MIT License
196 stars 19 forks source link

skipHours and skipDate cant work #19

Closed StarpTech closed 7 years ago

StarpTech commented 7 years ago

See https://github.com/fent/node-feedsub/blob/master/lib/feedsub.js#L240 skipHours and skipDate are always undefined. I think you forgot to compare it with the lastDate

fent commented 7 years ago

I think you linked to the wrong line? I don't see skipHours or skipDays there. And if you meant that the problem is they're not referenced there, it's because options.hours and options.days are set when those options are set.

Probably shouldn't be set on options though.

StarpTech commented 7 years ago

Hi @fent I set skipHours = true but it never works because options.hours is undefined.

StarpTech commented 7 years ago

Ok I understand it is possible to skip specific hours and you can control it with skipHours I couldn't find this in the docs. (after some rummage I could find it in the comments :D) thanks

fent commented 7 years ago

Ah, skipHours without hours is supposed to look at the feed's specified hours. Same for days. It could be that the feed does not have those tags.

But, I'll add hours and days to the docs. And they should probably be changed to hoursToSkip and daysToSkip to be more specific.