Skip to content

Commit

Permalink
Merge pull request #32 from thalleslmF/pr-207
Browse files Browse the repository at this point in the history
fix-license
  • Loading branch information
thalleslmF authored Jul 30, 2021
2 parents e12d37b + e8e70f9 commit 60b78e6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions licence.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@ const util = require("util");
const chalk = require("chalk");
function hasCorrectCopyrightDate(copyrightFile, file, startDateLicense) {
let requiredDate = ''
console.log(file.year < new Date().getFullYear())
console.log(startDateLicense)
console.log(new Date().getFullYear())
if (file.status === 'modified'){
if(file.year < new Date().getFullYear()) {
requiredDate = `Copyright ${startDateLicense, new Date().getFullYear()}`
}else{
requiredDate = `Copyright ${new Date().getFullYear()}`
}
requiredDate = `Copyright ${new Date().getFullYear()}`
}
if (file.status === 'created'){
requiredDate = `Copyright ${new Date().getFullYear()}`
}
console.log(requiredDate)
return copyrightFile.includes(requiredDate)
}

Expand Down

0 comments on commit 60b78e6

Please sign in to comment.