diff options
author | Piero Blunda <pieroblunda@gmail.com> | 2015-09-21 15:43:20 -0300 |
---|---|---|
committer | Piero Blunda <pieroblunda@gmail.com> | 2015-09-21 15:43:20 -0300 |
commit | bfe03d2531d5a44d83c78af8b77e87f169f4621e (patch) | |
tree | 472fc672664b7ba50163cf9863099896f0d9c189 /index.js | |
parent | f99ee4ce3b377fa8a2a9c78b571df8a0c39032d7 (diff) | |
download | git-hours-bfe03d2531d5a44d83c78af8b77e87f169f4621e.zip git-hours-bfe03d2531d5a44d83c78af8b77e87f169f4621e.tar.gz git-hours-bfe03d2531d5a44d83c78af8b77e87f169f4621e.tar.bz2 |
Using 4 spaces identation
Diffstat (limited to 'index.js')
-rwxr-xr-x | index.js | 56 |
1 files changed, 28 insertions, 28 deletions
@@ -121,33 +121,33 @@ function parseArgs() { } function parseSinceDate(options){ - var justNow, thisPeriod, paramDate; - switch(options.since){ - case 'tonight': - justNow = new Date(); - thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate()); - config.since = thisPeriod; - break; - case 'yesterday': - justNow = new Date(); - thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate()-1); - config.since = thisPeriod; - break; - case 'lastweek': - justNow = new Date(); - thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate()-7); - config.since = thisPeriod; - break; - case 'always': - break; - default: - paramDate = new Date(String(config.since)); - if(paramDate === undefined){ - config.since = 'always'; - }else{ - config.since = paramDate; - } - } + var justNow, thisPeriod, paramDate; + switch(options.since){ + case 'tonight': + justNow = new Date(); + thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate()); + config.since = thisPeriod; + break; + case 'yesterday': + justNow = new Date(); + thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate()-1); + config.since = thisPeriod; + break; + case 'lastweek': + justNow = new Date(); + thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate()-7); + config.since = thisPeriod; + break; + case 'always': + break; + default: + paramDate = new Date(String(config.since)); + if(paramDate === undefined){ + config.since = 'always'; + }else{ + config.since = paramDate; + } + } } function mergeDefaultsWithArgs(config) { @@ -276,7 +276,7 @@ function getBranchCommits(branchLatestCommit) { }; if(commitData.date > config.since || config.since === 'always'){ - commits.push(commitData); + commits.push(commitData); } }); |