Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isDateInRange(danPer, documentDate) {
- var danPerDate = new Date(danPer.slice(0, 4), Number(danPer.slice(4, 6)) - 1, 0, 0, 0, 0, 0),
- docDate = new Date(documentDate.slice(6, 10), Number(documentDate.slice(3, 5)) - 1, 0, 0, 0, 0, 0);
- if (docDate.setMonth(docDate.getMonth() + 12) < danPerDate.valueOf()) {
- return false;
- } else {
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement