Skip to content

Commit

Permalink
Merge pull request #31 from thalleslmF/pr-206
Browse files Browse the repository at this point in the history
Pr 206
  • Loading branch information
thalleslmF authored Jul 30, 2021
2 parents 2d757c2 + 310557d commit e12d37b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion licence.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const util = require("util");
const chalk = require("chalk");
function hasCorrectCopyrightDate(copyrightFile, file, startDateLicense) {
let requiredDate = ''
console.log(file.year)
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()}`
Expand All @@ -31,6 +33,7 @@ function hasCorrectCopyrightDate(copyrightFile, file, startDateLicense) {
if (file.status === 'created'){
requiredDate = `Copyright ${new Date().getFullYear()}`
}
console.log(requiredDate)
return copyrightFile.includes(requiredDate)
}

Expand Down

0 comments on commit e12d37b

Please sign in to comment.