From e8e70f9d5621955a5549a80d5fb833029f941d05 Mon Sep 17 00:00:00 2001 From: thalles Date: Fri, 30 Jul 2021 09:50:10 -0300 Subject: [PATCH] fix-license Signed-off-by: thalles --- licence.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/licence.js b/licence.js index 0671d23..a4df317 100644 --- a/licence.js +++ b/licence.js @@ -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) }